Reputation: 9225
I have a table and I am trying to make the alternate row colors by using the following expression:
=IIF(RunningValue(Fields!LastName.Value,COUNTDISTINCT,NOTHING) MOD 2 = 0
,IIF(ROWNUMBER(NOTHING) MOD 2=0,"#BED2F0","White")
,IIF(ROWNUMBER(NOTHING) MOD 2=1,"White","#BED2F0"))
But what is happening is, it sometime highlights two rows while skipping 2 rows...
Here is the output:
As you can see, there is blue, white, blue, white, white
, Why isn't it highlighting the correct row?
Also, I am able to enter the expression per textbox in the row but not the row as a whole. How can I select the entire row and change the color?
Upvotes: 1
Views: 162
Reputation: 1896
If you look carefully, these two expressions produce identical result:
IIF(ROWNUMBER(NOTHING) MOD 2=0,"#BED2F0","White")
IIF(ROWNUMBER(NOTHING) MOD 2=1,"White","#BED2F0")
Not sure why you have that but you can replace that whole expression:
=IIF(RunningValue(Fields!LastName.Value,COUNTDISTINCT,NOTHING) MOD 2 = 0
,IIF(ROWNUMBER(NOTHING) MOD 2=0,"#BED2F0","White")
,IIF(ROWNUMBER(NOTHING) MOD 2=1,"White","#BED2F0"))
with this:
=IIF(ROWNUMBER(NOTHING) MOD 2=0,"#BED2F0","White")
Upvotes: 2