简体   繁体   English

SSRS格式为负数

[英]SSRS Formatting for negative numbers

Ok, so I am familiar with formatting the colors of a cell like this 好的,所以我很熟悉像这样格式化单元格的颜色

=IIF(SUM(Fields!Dollars.Value) < 0, "Red", "Black")

but, I have inherited a report that has 80 columns and 4 rows of calculated fields which all print out black. 但是,我继承了一个包含80列和4行计算字段的报告,这些字段都打印成黑色。 I have been tasked with changing the format to represent negative numbers as red. 我的任务是更改格式以将负数表示为红色。

Does anyone know of an easy was to represent "CurrentValue" in a formula instead of referencing the textbox or report field? 有没有人知道一个简单的方法是在公式中代表“CurrentValue”而不是引用文本框或报告字段?

Something along the lines of 有点像

=IIF(SUM(CurrentCellValue) < 0, "Red", "Black")

This way I can select the whole table and add this formula to the font color. 这样我可以选择整个表格并将此公式添加到字体颜色。 Otherwise I will have to change the formula on 80*4 fields. 否则我将不得不在80 * 4字段上更改公式。 I really don't want to do that 我真的不想那样做

在字段的颜色表达式中使用下面的代码

= Iif (Me.Value <0, "Red", "Black")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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