Symptom
The currency number formatting does not work at all for the culture when set as:
System.Threading.Thread.CurrentThread.CurrentCulture = New Globalization.CultureInfo("ES-es")
Reproducing the Issue
- In Visual Studio 2005 or 2008, add a new crystal report template. No data source needed.
- Place a single unbound currency field anywhere on the report.
- Right click on the field > Edit Formula. Enter 1234567.89. The template generates a report containing the value formatted for the
US : $1,234,567.89 - Add the following line of code in a web app VS .NET 2005 or VS .NET 2008 before running the Crystal Report:
- System.Threading.Thread.CurrentThread.CurrentCulture = New Globalization.CultureInfo("ES-es")
- The template now generates a report containing this value: $1,234,567.89
- However, the value should look as: $1.234.567,89
- This has been reproduced with Crystal Reports 10.2 and higher in Microsoft Visual Studio .NET 2005 and 2008
Resolution
- The currency field will format correctly if the field is set to "Use System Default Format"
Keywords
KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , Problem
Product
Crystal Reports 2008 V1