我在 SSRS 中有一份报告,我正在尝试根据组更改背景颜色。我有 3 个组:YearMonth、Portfolio 和 Name。我想更改每个其他投资组合组的颜色。在每个投资组合组内,我希望所有行都是相同的颜色。
我尝试了以下表达式,当给定月份有奇数个投资组合时它会失败,即我不希望相同的颜色接触。
=IIF(RunningValue(Fields!Portfolio.Value, CountDistinct, "MonthYear") Mod 2, "Gainsboro", "White")
以上得到:
YearMonth Port# (Color)
Sep-11 Port1 (Gainsboro)
Port2 (White)
Aug-11 Port1 (Gainsboro)
Port2 (White)
Port3 (Gainsboro)
Jul-11 Port1 (Gainsboro)
我想:
YearMonth Port# (Color)
Sep-11 Port1 (Gainsboro)
Port2 (White)
Aug-11 Port1 (Gainsboro)
Port2 (White)
Port3 (Gainsboro)
Jul-11 Port1 (White)