如何根据列值更改报表查看器中行的背景颜色,有多个答案。我实际上使用过这样的一个:
=Iif(Fields!Age.Value <= 15, "LimeGreen",
Iif(Fields!Age.Value <= 30, "Blue",
Iif(Fields!Age.Value <=45, "Yellow",
Iif(Fields!Age.Value <=60, "Brown", "Red"))))
但我现在想要的是,一旦日期大于2015年11月30日,将背景颜色更改为浅蓝色 谢谢!
答案 0 :(得分:1)
尝试使用Switch语句:
=Switch(
Fields!Date.Value > CDATE("2015-11-30"),"Light Blue",
Fields!Age.Value <= 15, "LimeGreen",
Fields!Age.Value <= 30, "Blue",
Fields!Age.Value <= 45, "Yellow",
Fields!Age.Value <= 60, "Brown",
true, "Red"
)
如果这有助于您,请告诉我。