Blog Post

Conditional formatting in Reporting Services

,

Yesterday's post reminded me of another interesting technique I have used to change the color of the values on a report based on a range.

Let's say I wanted the color of a field to be black if the value was between 0 and 10, blue if between 11 and 20, green if between 21 and 30 and so on. This could be done with nested IIF functions in the report, but what a mess! So, what you could do is add an additional column in the results from the stored proc (you are using stored procs, aren't you?) to provide the color value. You could use a CASE expression in the T-SQL statement to provide the color value. Then in the report, set the foreground color property to the value of the column.

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating