Row color and Alternate Row color for Table in RDLC Report

Jith picture Jith · Jun 26, 2011 · Viewed 39k times · Source

How do I give row color and alternate row color for a Table in RDLC report? When I googled I found most of the result says something like = iif(RowNumber(Nothing) mod 2, "Red", "White") OK! But where should I place this stuff? Any help will be appreciated.

Answer

marc_s picture marc_s · Jun 26, 2011

Very easy! :-)

In your report designer surface, you need to select the data row that contains your data - something like this:

enter image description here

When you look at the Properties box for that data row, you will see a property call BackgroundColor - open the dropdown, and you'll see all the usual colors - but also a menu item at the bottom called Expression...:

enter image description here

When you select that item, a dialog box will open that allows you to insert an expression to determine the background color for that row - that's where you need to put that expression that you have - and that's all there is!