January 22, 2016 at 12:26 am
How do I colorcode column values in SSRS based on values of 2 columns.
Col1 , col2,(col2-should be color coded)
If col1 = A and col2 = 1 then col2 = Blue
If col1 = B and col2 = 2 then col2 = Red
Thanks
January 22, 2016 at 5:46 am
In the report designer, select the cell you want to color code. Go to the properties, find the color (either foreground or background, whichever one you want), and replace the value there with an expression: Iif(<some condition>;"Red";"Green")
January 25, 2016 at 12:17 am
I am aware of that..
but how do I write this condition in SSRS.
If cell1=value1 and cell2=value2 then for cell2 color=red
January 25, 2016 at 12:52 am
You don't reference the cell but the corresponding field in the data source. E.g.:
=IIF(Fields!Blocked.Value=1 And Fields!Current_Overdue.Value > 0, "Red", "Green")
January 25, 2016 at 2:20 am
By evaluating 2 columns(Blocked and Current_Overdue) and then color coding 2nd column.
Can I have somethinglike this to color code a column (Current_Overdue)
=IIF(Fields!Blocked.Value=1 And Fields!Current_Overdue.Value = 0, "Red", "Green")
=IIF(Fields!Blocked.Value=2 And Fields!Current_Overdue.Value = 10, "Red", "Green")
=IIF(Fields!Blocked.Value=3 And Fields!Current_Overdue.Value = 20, "Red", "Green")
=IIF(Fields!Blocked.Value=4 And Fields!Current_Overdue.Value = 30, "Red", "Green")
=IIF(Fields!Blocked.Value=5 And Fields!Current_Overdue.Value = 40, "Red", "Green")
January 25, 2016 at 2:30 pm
sqlnewbie17 (1/25/2016)
By evaluating 2 columns(Blocked and Current_Overdue) and then color coding 2nd column.Can I have somethinglike this to color code a column (Current_Overdue)
=IIF(Fields!Blocked.Value=1 And Fields!Current_Overdue.Value = 0, "Red", "Green")
=IIF(Fields!Blocked.Value=2 And Fields!Current_Overdue.Value = 10, "Red", "Green")
=IIF(Fields!Blocked.Value=3 And Fields!Current_Overdue.Value = 20, "Red", "Green")
=IIF(Fields!Blocked.Value=4 And Fields!Current_Overdue.Value = 30, "Red", "Green")
=IIF(Fields!Blocked.Value=5 And Fields!Current_Overdue.Value = 40, "Red", "Green")
That syntax is not correct. I assume you means something like this:
=IIF( (Fields!Blocked.Value=1 And Fields!Current_Overdue.Value = 0)
OR (Fields!Blocked.Value=2 And Fields!Current_Overdue.Value = 10)
OR (Fields!Blocked.Value=3 And Fields!Current_Overdue.Value = 20)
OR (Fields!Blocked.Value=4 And Fields!Current_Overdue.Value = 30)
OR (Fields!Blocked.Value=5 And Fields!Current_Overdue.Value = 40), "Red", "Green")
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply