reporting-servicesssrs-2008ssrs-2008-r2ssrs-2012

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. 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?

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. I really don't want to do that


Solution

  • In the Color expression of the fields use the code below:

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