Add alternating row color to SQL Server Reporting services report

Go to the table row’s BackgroundColor property and choose “Expression…”

Use this expression:

= IIf(RowNumber(Nothing) Mod 2 = 0, "Silver", "Transparent")

This trick can be applied to many areas of the report.

And in .NET 3.5+ You could use:

= If(RowNumber(Nothing) Mod 2 = 0, "Silver", "Transparent")

Not looking for rep–I just researched this question myself and thought I’d share.

Leave a Comment