简体   繁体   中英

SSRS 2008 Negative Currency Values

I have a column with negative currency values. I have changed the text box properties to display negative currency values as '-$##.##' but when I run the report the negative values still show up as (##.##). Any ideas on what is causing this or if there is a format string to fix the issue?

My code is:

Format(Sum(Fields!Column1.Value, "DataSet1"),"C2")

EDIT: I SOLVED IT The code below should work for anyone else with the issue.

Format(Sum(Fields!Column1.Value, "DataSet1"),"$#.00;-$#.00")

What is your Locale? For the US, the parenthesis seems to be the expected result for negative numbers for the C format.

123.456 ("C", en-US) -> $123.46

123.456 ("C", fr-FR) -> 123,46 €

123.456 ("C", ja-JP) -> ¥123

-123.456 ("C3", en-US) -> ($123.456)

-123.456 ("C3", fr-FR) -> -123,456 €

-123.456 ("C3", ja-JP) -> -¥123.456

https://msdn.microsoft.com/en-us/library/dwhawy9k(v=vs.110).aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM