将销售数量低于一万的用暗红色表示
选中销售数量数据列
修改属性中的背景颜色(BackgroundColor)
点击表达式,输入:=iif(Sum(Fields!sale_qty.Value)<10000,"Maroon","White"),确定
预览
主要是考查表达式的使用
例:=IIF(Sum(Fields!sale_qty.Value)<10000 and IsNothing(Sum(Fields!sale_qty.Value))=0,"Maroon","White") 排除了为空值的数据格
=IIF(Sum(Fields!sale_qty.Value)<10000 ,"Maroon",IIF(Fields!sale_qty.Value)<20000,"Blue","White"))
也可以用,CHOOSE ,SWITCH
=Choose(Fields!sale_qty.Value,"red","blue")
=SWITCH(SUM(Fields!sale_qty.Value)<=1000,"Tomato",Sum(Fields!sale_qty.Value)<5000,"Orange")