我正在尝试使用此表达式来更改SSRS 2008中文本框的背景颜色
=IIF(Fields!Score.Value <=12, "Green", IIF(Fields!Score.Value >=13, "Amber" , IIF(Fields!Score.Value >=19, "Red" ,"White")))
结果是15,它应该拉回一个它没有做的琥珀色。
得分字段的阈值是
高19-24 中等13-18 低&lt; 12
答案 0 :(得分:1)
尝试将字段值转换为INT,可以将表达式视为字符串
=IIF(CInt(Fields!Score.Value) <=12, "Green", IIF(CInt(Fields!Score.Value) >=13, "Amber" , IIF(CInt(Fields!Score.Value) >=19, "Red" ,"White")))
答案 1 :(得分:0)
假设得分&#39;是一个INT,你只需要交换&gt; = 13和&gt; = 19的测试,如下所示:
=IIF(Fields!Score.Value <=12, "Green", IIF(Fields!Score.Value >=19, "Red" , IIF(Fields!Score.Value >=13, "Orange" ,"White")))
还有&#39; Amber&#39;不是一个有效的颜色名称,所以将其改为类似于&#39; Orange&#39;太