Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Advice from Aunt Kathi

Kathi Kellenberger is a Sr. Consultant with Pragmatic Works. She is an author, speaker and trainer.

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.

Comments

No comments.

Leave a Comment

Please register or log in to leave a comment.