Search This Blog

Conditional Formating In SSRS Using Switch Condition

Changing Color of a Column Data Based on Condition in SSRS

Many Times you have a requirement in SSRS like changing Color of Column Values Based on some Conditions
for this Select the TextBox Holding your Column Values
Right Click Properties-Font-Color-Expression
Write this Expression
=Switch(ReportItems!PCTContribution.Value > .1, "green", ReportItems!PCTContribution.Value < .02, "red")
PCTContribution is my Column Holding all ContributionValues

If You Can see the PCT Cotribution Column the values are Red Greed and Black
where values are greater then .1 they are red
where values are greater then .2 they are green
Rest are black
You can write any number of conditions inside Switch.

This is how we can apply color condition in our Column Data

Note: If you only want to apply if or else ie only two condition you can write this code

=Iif(ReportItems!PctContribution.Value > .1, "Green", "Black")

Satisfying condition will have Green Values rest all will Black .





No comments:

Post a Comment