Friday, May 8, 2015

Need help in creating Color Combination logic for Matrix report

Hi Anuj,

As we know, we could get the Probability and Impact field value. But we must set the color manually. SQL Server Reporting Service don't konw what color you want to set to the text box. In a expression, if the field value satisfy the condition, the expression will return a result what we set. If the field value don't satisfy any conditions,  the expression will return a fixed result. Please refert to the code below:

=Switch(Fields!probability.Value="High" and Fields!impact.Value="Possible","Red",
Fields!probability.Value="Medium" and Fields!impact.Value="Unlikely","Yellow",
Fields!probability.Value="High" and Fields!impact.Value="Unlikely","Blue",
Fields!probability.Value="Low" and Fields!impact.Value="Unlikely","Gray",
Fields!probability.Value="Medium" and Fields!impact.Value="Likely","Maroon",
True,"Aqua")

Regards,
Shrek Li

No comments:

Post a Comment