Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
JAG7777777
Starting Member
25 Posts |
Posted - 2012-12-05 : 08:14:26
|
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,jag7777777JAG7777777 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-12-06 : 02:14:15
|
can you show a screenshot of how you want formatting to be done in matrix groups?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
JAG7777777
Starting Member
25 Posts |
Posted - 2012-12-06 : 04:02:04
|
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 :-)JAG7777777 |
|
|
|
|
|