Reporting Services Alternating Row Colors

Reporting Services is a easy way to produce good reports with little effort.  A common tablature based report style is to have rows of alternating color.  This eases the readers eyes when it comes to visually scanning and extracting data row by row.  In order to alternate the row color, you need to give the BackgroudColor property of the row a formula to determine which color to apply.  Here is a basic formula to switch colors between white and gray.

=iif(RowNumber(Nothing) Mod 2, "White", "Gainsboro")

The UI property window would look like the image shown below, where the red arrow points to the tables highlighted row.

rs_row_alt_color

No comments: