Tuesday, August 10, 2010

How to set an alternate row color in SSRS 2005

 I’m going to show you how to set alternate row color in a report that contains data displayed in a table using SSRS 2005
alternate_row_color
First you will have to select the details row in the design mode, then from the Properties panel select the BackgroundColor property and go to edit its Expression, you will find the default value is Transparent, so replace it with this line of code:
=IIF(RowNumber(Nothing) mod 2, "Wheat""White") and click OK
This line of code is telling the SSRS that if the row number was an odd number then make the row background color is White, else make it Wheat.
Run the solution and Have fun with colors.

No comments: