65.9K
CodeProject is changing. Read more.
Home

How to set an alternate row color in SSRS 2005

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.25/5 (4 votes)

Aug 26, 2010

CPOL
viewsIcon

38252

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 :)