SSRS Conditional Formatting Switch or IIF

前端 未结 1 1641
萌比男神i
萌比男神i 2020-12-03 03:08

I currently have the following 2008 SSRS Report and I want to conditionally format background of the columns based on some logic.

I have three columns and two of whi

相关标签:
1条回答
  • 2020-12-03 03:33

    To dynamically change the color of a text box goto properties, goto font/Color and set the following expression

    =SWITCH(Fields!CurrentRiskLevel.Value = "Low", "Green",
    Fields!CurrentRiskLevel.Value = "Moderate", "Blue",
    Fields!CurrentRiskLevel.Value = "Medium", "Yellow",
    Fields!CurrentRiskLevel.Value = "High", "Orange",
    Fields!CurrentRiskLevel.Value = "Very High", "Red"
    )
    

    Same way for tolerance

    =SWITCH(Fields!Tolerance.Value = "Low", "Red",
    Fields!Tolerance.Value = "Moderate", "Orange",
    Fields!Tolerance.Value = "Medium", "Yellow",
    Fields!Tolerance.Value = "High", "Blue",
    Fields!Tolerance.Value = "Very High", "Green")
    
    0 讨论(0)
提交回复
热议问题