Problem with numeric formatting

I have a reports that use various sums to calculate totals. However if I enter this into the format field of textbox properties $#,###,###.##;($#,###,###.##) it gives unpredictable results. Some columns will format to 2 decimal places others will only format to the nearest dollar I though by explicitlty placing .## it would always go to 2 decimal places

Cheers

Damien



Answer this question

Problem with numeric formatting

  • Brian Merz

    Sure it will. I have used it in the past. It should even work with in your Windows or Web application. In case if you have to use them in your .NET application explore Currency Formatting from System.Globalization. It picks up currency symbol from your Windows settings.
  • Coëndou

    Are you sure C2 will place brackets around negative numbers Which is my clients requirement

    Cheers

    Damien


  • Ahmed Amin El-Morali

    C2 works great with currency,

    How about regular numbers without $ symbols


  • Saptagiri

    maybe you can try just using C as the format string

    a capital C indicates to display the numeric in currency format.


  • MarkGrant

    If you want rounding upto two decimal places you can use C2 as your format string. Currency format should take care of representing negative numbers as per your requirement.
  • snymanr

    Same issue if I use C but I need to use the above formatting for negative numbers so even if C worked it wouldn't be an answer. Thanks anyway.
  • Problem with numeric formatting