Format Currency | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Format Currency

Hi
if i run the below sql statement in Query analyzer
select 2967.0000 +1.1480 +217.7942 it’s giving ————
3185.9422 the same field i am formating to currency in Reporting services report, there i am getting $3184.79 i am losing nearly 2 dollers. if any one faced same problem before please kindly point me the solutions. Thanks
Mathi Thanks & Regards
Mathivanan K
Great work may have to pass through these stages – ridicule, opposition, and then acceptance. Each man who thinks ahead of his time will probably be greatly misunderstood.- vivekananda
It seems the output from Query analyzer is correct as far as arithmetic is concerned. —
Sunil "Its nice to be Important, But its more important to be Nice"
Seems the second value : 1.1480 is being missed out in Reporting services report as this is exactly the difference if you take precision upto two digits —
Sunil "Its nice to be Important, But its more important to be Nice"
At the reporting services report,
drag in the field to a textbox then right click on the textbox, choose Expression Edit the expression:
="$" & Format(sum(Fields!YourFieldName.value, YourDataSetName),"##,###,##0.00") and you should be able to get the correct result..
]]>

Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |