SSRS Switch function to fill background colour

牧云@^-^@ 提交于 2020-01-05 12:10:13

问题


I need to use the SSRS Switch function to fill background colour

=switch(Fields!Ref_No.Value="AAA","Green",Fields!Ref_No.Value= not like "AAA","RED"

How do I say if first 3 letters not like AAA then fill background Red?


回答1:


Just use Left and <>:

=Switch(Fields!Ref_No.Value="AAA", "Green"
  , Left(Fields!Ref_No.Value, 3) <> "AAA", "Red")

Left makes sure you're considering the first three characters only as per your requirement.



来源:https://stackoverflow.com/questions/19350144/ssrs-switch-function-to-fill-background-colour

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!