DiplayFormat $#,0.00;-$#,0.00 does not work on negatives
Hello,
I need to display negative currency amounts with a negative sign instead
of brackets in my report. I use TppDBText and the DisplayFormat is set
to $#,0.00;-$#,0.00. However the negative amounts are still displayed in
brackets as if the format was set to $#,0.00;($#,0.00). But if I take
out the $ sign in the DiaplayFormat then the negative diplays with the
'-' sign. I don't understand. Is there a way to display the negative
numbers in '-' and with the '$' sign? I'm using Delphi 5 and Report
Builder v5.54. Thanks.
Bill
I need to display negative currency amounts with a negative sign instead
of brackets in my report. I use TppDBText and the DisplayFormat is set
to $#,0.00;-$#,0.00. However the negative amounts are still displayed in
brackets as if the format was set to $#,0.00;($#,0.00). But if I take
out the $ sign in the DiaplayFormat then the negative diplays with the
'-' sign. I don't understand. Is there a way to display the negative
numbers in '-' and with the '$' sign? I'm using Delphi 5 and Report
Builder v5.54. Thanks.
Bill
This discussion has been closed.
Comments
The output is the result of a call to Delphi's FormatFloat function. You
can change the negative currency setting for Windows by going to the
Regional Options in your Control Panel and selecting the "Currency" tab. If
you would like to override the Delphi behavior, you can use the example
below to replace the call to FormatFloat with your own.
http://www.digital-metaphors.com/tips/ReplaceDisplayFormats.zip
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com