September 4, 2009 at 11:09 pm
Hi,
I am printing the following report
NY 1800 82
NY 1900 299
NY 2000 1220
CA 1800 10
CA 1900 100
MI 1800 18
MI 1900 172
MI 2000 1783
I am trying to find a way so the background color for NY will be grey. when the lines are CA, background color will be yellow. when the lines are MI, alternate back to grey.
how to i specify an alternating background color based on grouping of the state?
Thanks.
September 7, 2009 at 4:31 am
for statewise color
Opne table row Properties-- BackGround color --Expression -- =iif(state="CA" ,"red" ,iif(state="NY" ,"blue" ,"green"))
for alternate row color
Opne table row Properties-- BackGround color --Expression -- =iif(iif(RowNumber("[dataset]") mod 2 =0 ,"red" , "blue")
September 10, 2009 at 2:06 pm
thanks! that works wonderfully.
the table is now matrix, how to do the same thing for matrix?
September 11, 2009 at 9:22 am
On the matrix cell, where you have state, for the background property use the Select expression
IIF is only for either or choices. when you have more than 2, then, Switch is more suitable.
Switch(fldState = "NY", "Blue", fldState = "CA","Red",fldState = "NJ", "Green", nothing,"Grey")
The above will give you Blue for NY, Red for CA, Green for NJ and Grey for all other states.
"Software changes. This is a rather obvious statement, but it is a fact that must be ever present in the minds of developers and architects. Although we tend to think of software development as chiefly an engineering exercise, the analogy breaks down very quickly. When was the last time someone asked the designers of the Empire State building to add ten new floors at the bottom, put a pool on the top, and have all of this done before Monday morning? " : Doug Purdy, Microsoft Corporation
September 11, 2009 at 9:24 am
I used this yesterday for a matrix, and it worked fine:
http://business-intelligence.kdejonge.net/alternating-backgroundcolor-in-tablix-for-rows-of-a-group
Hope it works for you!
September 17, 2009 at 10:34 am
September 28, 2009 at 9:06 pm
thanks becklery, bubberz, and Siva. i like options. 😀
so, i like each of your different, yet, helpful solution.
October 16, 2009 at 3:29 pm
In my report, one column/cell is grouped by products and it children are sales, dept, employees, etc.
Now I only want to change color of dept cell to red if count is over 70.
Also, I only want to change color of sales cell to black if count is over 120.
Below is an example that changes color of dept cell to red if count is over 70, the only problem
is it only works since all other cell count values are below 70, I cannot force it to check for count over 70 on the dept cell only. Any suggestions ?
===
Expression properties:
=Count(Fields!Dept.Value)
===
Fill properties:
=Switch
(
Count(Fields!Dept.Value) > 70, "Red",
Count(Fields!Dept.Value) < 9, "Transparent",
True, "Transparent"
)
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply