SQL Scrapbook

Short and simple SQL Server posts

Different background color for alternate rows

leave a comment »

It’s a very common request to alternate the background color of rows in SQL Server Reporting Services. There is a simple way to this and we will see how.

In the properties window of the detail row(of the data region), find background color and choose expression. In the edit expression window, paste this expression.

=IIF( ROWNUMBER (NOTHING) MOD 2, “Silver“,”Grey“)

Click Ok and you are all set.


Written by sqlscrapbook

July 24, 2010 at 1:32 pm

Posted in SSRS

Tagged with

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: