Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Negative Number/Currency Formatting

I'm using Crystal Reports in Microsoft Visual Studio 2005. The report I am working on is part of a money-counting application. I have two copies of the Amount field, overlaid on each other.

The first copy of the Amount field is formatted with "System Default Number Format" selected on the Crystal Format Editor - Number tab. This field is suppressed if exchange rates are used.

The second copy of the Amount field is formatted with "Custom Style" selected on the Number tab, and then the Custom Styles|Number tab has specific settings for Decimals (1.0000), Rounding (0.0001), and Negatives (choice of minus sign or parentheses). This second copy is suppressed if exchange rates are not used.

My testing shows that even though the SQL server dataset for the report has the Amount field defined as money, Visual Studio 2005 assigns the datatype System.Decimal. Therefore, when the first copy of the Amount field is formatted to use "System Default Number Format" the field formatting reflects the Windows Control Panel Regional Settings for Numbers when the report is viewed at runtime. This part is fine.

Here's where I need help: How can I make the second copy of the Amount field retain the Decimals 1.0000 and Rounding .0001 settings but reflect the Regional Settings for either Numbers: Negative Number Format, or Currency: Negative Currency Format?

P.S. There is a checkbox titled "Use Accounting Format" on the Custom Styles|Number tab, and the MSDN help for this says "When you select this option, the negative symbol used and its position is determined by the Windows Regional Settings (it will be either the minus sign or the brackets)." I was hoping this means that the report field when viewed at runtime will reflect Regional Settings for negatives, but what I think it actually means is that the Negatives setting shown in the Crystal Format Editor|Custom Style|Number tab reflect your Regional Settings at the time.

Former Member
Not what you were looking for? View more on this topic or Ask a question