0

我在 SSRS 2012 中有一份报告,它使用填充的表达式交替显示颜色,如下所示:

= IIf (RowNumber(Nothing) Mod 2 = 0, "WhiteSmoke", "White")

我想根据字段的值突出显示一个字段(在本例中称为 R)。我试过这个:

= IIf (Fields!R.Value > 5, "Yellow" ,(IIf RowNumber(Nothing) Mod 2 = 0, "WhiteSmoke", "White"))

但是当我预览报告时出现错误。

The BackgroundColor expression for the text box 'R' contains an error: [BC30516] Overload resolutoin failed because no accessible 'IIf' accepts this number of arguments.

我怎样才能实现我想要的?

4

1 回答 1

1

尝试:

=IIf(Fields!R.Value > 5
  , "Yellow"
  , IIf(RowNumber(Nothing) Mod 2 = 0, "WhiteSmoke", "White"))
于 2013-04-20T19:20:54.173 回答