Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Alternate line formatting on matrix style reports
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

United Kingdom
25 Posts

Posted - 12/05/2012 :  08:14:26  Show Profile  Reply with Quote
We have a standard formatting on table style reports which alternates the background colour of each row between grey and white using an expression. This works fine when it is a standard table tablix.
However, when we employ the same expression on matrix tablixes with grouped rows and columns it looks a mess - presumably due to the groups being present.

Has anyone worked out a way of formatting a matrix report that has groups on both the columns and rows - but still prints out with an alternative background colour (i.e. similar to the old white and green computer paper)?

Many thanks,



Very Important crosS Applying yaK Herder

52326 Posts

Posted - 12/06/2012 :  02:14:15  Show Profile  Reply with Quote
can you show a screenshot of how you want formatting to be done in matrix groups?

SQL Server MVP

Go to Top of Page

Starting Member

United Kingdom
25 Posts

Posted - 12/06/2012 :  04:02:04  Show Profile  Reply with Quote
Hi visakh16,

Thanks for your reply.

Managed to resolve this last night. I used the following expression in the background colour:

=iif(RunningValue(Cstr(Fields![RowGroupNameHere].Value),CountDistinct,"DatasetName") Mod 2,"LightGrey", "White")

This exploits the CountDistinct across the entire matrix's rows to essentially provide a row counter at each row group on the matrix - which can then be used with the Mod 2 to return either a 1 or a 0. Seems to work really well so thought I'd share for anyone else having the same problem :-)

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000