在SSRS中切换声明

时间:2013-04-09 08:41:24

标签: if-statement reporting-services switch-statement

我想要条件格式化文本框的背景颜色。我想要这样的东西。如果我使用If - else语句仍然可以。

  =Switch

     (
       (First(Fields!Risk_Level.Value, "BBS_ID") = "high","Red"),
       (First(Fields!Risk_Level.Value, "BBS_ID") = "Medium","Orange"),
       (First(Fields!Risk_Level.Value, "BBS_ID") = "Low","Green")
      )

1 个答案:

答案 0 :(得分:2)

以下内容应该有效:

=Switch(
        Fields!Risk_Level.Value = "high","Red",
        Fields!Risk_Level.Value = "Medium","Orange",
        Fields!Risk_Level.Value = "Low","Green"
       )