Online Tutorials & Training Materials |
Register Login

Change the Alternate Color in a Row

|| || 1

Change the Alternate Color in a Row


I want to change the Alternate Row in different color.

I have used the below code but,

if (row.RowNumber Mod 2 = 0) then
BackgroundColor = SmokeGray
end if

There are some rows which have 0 Value which I have hidden.
Now the problem I face is if 2 & 4 Column is non zero and 3 Column is zero
Then there is continuous row color which I don't want.

Please help me with some good suggestion.


  • 10 Dec 2013 8:30 am
    Creating a Green-Bar Report
    To alternate the background color for every other row in a table, you can set the BackgroundColor property for each text box in the row to the same conditional expression. This technique works for detail rows only in a table with no groups.
    =IIF(RowNumber(Nothing) MOD 2, "PaleGreen", "White")