Symptom
- No decimals.
- Why are the currency fields rounded to the nearest dollar amount without the decimal places?
- A Microsoft Visual Studio .NET (VS .NET) application uses the Crystal Report Application Server (CE RAS) SDK as the reporting development tool. When exporting to CSV format through the application, the currency fields are rounded to the nearest dollar amount (up or down) without the decimal places.
Environment
- SAP Crystal Reports, version for Visual Studio .NET 2008
Cause
- Confirmed by the developers under ADAPT00277901, that it is a product limitation when exporting to CSV from a .Net application.
- When exporting to the CSV format from Crystal Reports designer, the decimals value will be retained, but not when exporting from a .Net application.
Resolution
- To workaround this limitation, create a formula field and apply the 'ToNumber' function to the currency field.
- Create a formula to convert the currency field to number like:
ToNumber({Field Name.Currency Field})
- Insert the formula field in the report instead of the currency database field.
Now, when the report is exported from a .Net application, the formula field will retain the decimal value and not round up or down.
Keywords
DOTNET CSV ROUNDED VS.NET EXPORTING TONUMBER RAS.NET Crystal Reports for Visual Studio Export CSV Currency , c2015519 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Bug Filed
Product
SAP Crystal Reports, version for Visual Studio .NET 2005 ; SAP Crystal Reports, version for Visual Studio .NET 2008 ; SAP Crystal Reports, version for Visual Studio .NET 9.1