Change Row color based on multiple results
Hi guys.
I have seen the syntax for adding colors to rows, I get that but no where have I seen the possibility to enact the expression on two variables
=Switch(Fields!PctComplete.Value >= 10, "Green", Fields!PctComplete.Value >= 1, "Blue", Fields!PctComplete.Value = 1, "Yellow", Fields!PctComplete.Value <= 0, "Red",)
So rather than that above I would like to do something like
=Switch(Fields!PctComplete.Value >= 10 and Feilds!OtherField.Value = 1, "Green", Fields!PctComplete.Value >= 1, "Blue", Fields!PctComplete.Value = 1, "Yellow", Fields!PctComplete.Value <= 0, "Red",)
Or maybe..
=Switch(AND(Fields!PctComplete.Value >= 10, Fields!Other.Value = 1), "Green", Fields!PctComplete.Value >= 1, "Blue", Fields!PctComplete.Value = 1, "Yellow", Fields!PctComplete.Value <= 0, "Red",)
Is this possible or am I pushing it?
Thanks Caz
June 30th, 2011 9:25pm
like this:
=Switch((Fields!PctComplete.Value >= 10 and Feilds!OtherField.Value = 1), "Green", Fields!PctComplete.Value >= 1, "Blue", Fields!PctComplete.Value = 1, "Yellow", Fields!PctComplete.Value <= 0, "Red")Rgds Geoff
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2011 11:16pm
Hi Caz1224,
As Geoff posted, you can try to use the expression above to set the color of each rows. By the way, here is a good article about Expression Examples in Reporting Services, please see:
http://msdn.microsoft.com/en-us/library/ms157328.aspx
If you have any more questions, please feel free to ask.
Thanks,
Bin Long
July 3rd, 2011 11:01pm