SSRS Dynamically change cell color and font color

I need to change the background color of a table cell to yellow and the font color to bold / red for values ​​that are less than 80.

Cell Expression = Fields! Mark.value

How to change cell background color / Fill color to yellow?

+8
reporting-services ssrs-2008 ssrs-tablix
source share
2 answers

Almost everything in SSRS is an expression, so you can use VBA code to conditionally set the value of a property.

To set the background color, set the BackgroundColor property of the table cell to:

 =IIF(Fields!Mark.Value < 80, "Yellow", "White") 

To set the font to bold, set the Font - FontWeight property of the table cell property:

 =IIF(Fields!Mark.Value < 80, "Bold", "Normal") 

To make the text red, set the Color property of the table cell:

 =IIF(Fields!Mark.Value < 80, "Red", "Black") 
+11
source share
  • select the text box β†’ right click-> go to property
  • font-> color-> enter the expression ex: = iif (Fields! status.Value = "1", "Green", "Red")
0
source share

All Articles