[英]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.
对于美国,括号似乎是 C 格式的负数的预期结果。
123.456 ("C", en-US) -> $123.46
123.456(“C”,美国)-> 123.46 美元
123.456 ("C", fr-FR) -> 123,46 €
123.456 ("C", fr-FR) -> 123,46 €
123.456 ("C", ja-JP) -> ¥123
123.456 ("C", ja-JP) -> ¥123
-123.456 ("C3", en-US) -> ($123.456)
-123.456(“C3”,美国)->(123.456 美元)
-123.456 ("C3", fr-FR) -> -123,456 €
-123.456 ("C3", fr-FR) -> -123,456 €
-123.456 ("C3", ja-JP) -> -¥123.456
-123.456 ("C3", ja-JP) -> -¥123.456
https://msdn.microsoft.com/en-us/library/dwhawy9k(v=vs.110).aspx https://msdn.microsoft.com/en-us/library/dwhawy9k(v=vs.110).aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.