http://www.sqlservercentral.com/blogs/kathi_kellenberger/2007/03/11/conditional-formatting-in-reporting-services/ Printed 2015/03/27 06:55PM
Conditional formatting in Reporting Services
2007/03/11Yesterday'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.