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 |
bushfoot
Yak Posting Veteran
53 Posts |
Posted - 2008-12-11 : 14:12:33
|
I want to do conditional row coloring...Is there a way I can set a global?In ssrs alternating row colors every 4 will work like this white whitewhiteyellowwhite whitewhiteyellowWhat I want to do is white white whiteyellowyellow yellowyellowSo I need a way to say .. when the rownumber mod 4 is evenly divisible by 4 then set color as expected but toggle the default color to something else. |
|
X002548
Not Just a Number
15586 Posts |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-12 : 09:48:06
|
are first 3 & next 4 two groups? if yes you can simply use =IIF(Inscope("Group1"),"White","Yellow") |
 |
|
bushfoot
Yak Posting Veteran
53 Posts |
Posted - 2008-12-12 : 10:45:19
|
Its a table report not a matrix report. Oh and in my sample, there are suppose to be 4 whites, then 4 yellows, then 4 whites, then 4 yellows, etc. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-13 : 00:47:34
|
quote: Originally posted by bushfoot Its a table report not a matrix report. Oh and in my sample, there are suppose to be 4 whites, then 4 yellows, then 4 whites, then 4 yellows, etc.
and are each of 4 records a single group's data? |
 |
|
bushfoot
Yak Posting Veteran
53 Posts |
Posted - 2008-12-15 : 11:16:45
|
=IIf((System.Convert.ToInt32(Math.Ceiling(RowNumber("ReportData") / 4)) Mod 2 = 0), "LemonChiffon", "White")This is the solution for my problem.. by getting the ceiling I get the "bucket" the row falls into and then the bucket number (1, 2,3,4,etc) is tested for odd/even for color toggle. |
 |
|
|
|
|
|
|