SSRS alternating row color within groups

I have a ssrs table report with row grouping, and I would like to know how to change the colors of rows in groups without changing the background color of the group column itself. With the answers that I found and implemented, I get the effect of the second table in the picture when I need the effect of the first table:

enter image description here

Any help would be greatly appreciated.

This is an image of the actual report and its grouping:

enter image description here

+7
sql reporting-services
source share
1 answer

The RowNumber method only works with a group of parts, that is, with a lower-level group (without specific group columns). Think of it as returning a row in a dataset.

Instead, I would write an expression that computes the equivalent of RowNumber, but for the group level - as a rule, something uses RunningValue ... CountDistinct in the Group Key field, for example:

= Iif ( RunningValue ( Fields!tableid.Value , CountDistinct , "TheNameOfYourGroup") Mod 2 = 0, "White", "WhiteSmoke")

+14
source share

All Articles