Search code examples
asp.netreporting-servicesssrs-2008rdlc

Row color and Alternate Row color for Table in RDLC Report


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.


Solution

  • 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!