Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / SQL

How to set an alternate row color in SSRS 2005

4.25/5 (4 votes)
26 Aug 2010CPOL 38.3K  
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 :)

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)