Skip to main content

Alternating Row Background Color For SSRS Matrix (Pivot Table)

I had a tough time to apply alternate row colors to a SSRS Matrix and finally figured out!
Without further ado, here it is...

Assume you have a matrix with more than 1, lets say 2 row groupings; RG1 and RG2.

1. Right-click on RG2 (innermost row group), and select "Insert Group"; for simplicity call it "RowColorGroup"
2. In the "Group On" section, add some constant value - for example ="" or ="ankeet" etc... you get the idea!
3. Select the newly created group "RowColorGroup" and enter the following in its "Value" property: =iif(RunningValue(Fields!RG1.Value & Fields!RG2.Value,CountDistinct,Nothing) Mod 2, "LightSteelBlue", "White")
4. Select the "BackgroundColor" property of "RowColorGroup" and enter "=Value"
5. Set the width of "RowColorGroup" to 0pt and "CanGrow" to false
6. Select the data cell(s) and set their "BackgroundColor" property to "=ReportItems!RowColorGroupTextBox.Value"

All Done! Here's how it looks like












Please consider the environment before printing this blog! Go Green!

Comments

Anonymous said…
Thanx for the tip!
Anonymous said…
I have the following issue:

Item1 class1 countclass1
class2 countclass2
class3 countclass3

I can get my Items to alternate colors and then I can get all classes to equal the same color as the parent Item, but I can NOT get me countclass rows to change colors at all to match either the color of the class or item. It simply remains white with everything I have tried. Can you offer a suggestion? Thanks!
pragyan said…
This comment has been removed by the author.
Lavanya said…
with us to get some idea about that content.Thanks for sharing
Microstrategy Online Course
Microstrategy Certification
Abby said…
This is a very helpful guide for applying alternate row colors in SSRS Matrix.