[英]Multiple conditions in SSRS expression
I know how to use SSRS expression when there is a single condition. 我知道只有一个条件时如何使用SSRS表达式。
=iif(fields!Type.value='Invoce', 'Red','Black')
But how to write it if there are several conditions, for example 但是,如果有多个条件,例如如何写
if Type=invoce type=Purchse Return, Type=Sales Return
and i need to give different colours for all. 我需要为所有人提供不同的颜色。
Thanks 谢谢
IIF: IIF:
=IIF(fields!Type.value = "Invoice1", "LightBlue", IIF(fields!Type.value = "Invoice2", "Plum" , IIF(fields!Type.value="Invoice3", "Orange", "Aqua") ) ) = IIF(fields!Type.value =“ Invoice1”,“ LightBlue”, IIF(fields!Type.value =“ Invoice2”,“ Plum” ,IIF(fields!Type.value =“ Invoice3”,“ Orange”,“ Aqua“) ) )
SWITCH: 开关:
=SWITCH(Fields!id.Value = "Invoice1", "LightBlue", Fields!id.Value = "Invoice2","Plum" , Fields!id.Value = "Invoice3","Orange", TRUE, "Aqua") = SWITCH(Fields!id.Value =“ Invoice1”,“ LightBlue”, Fields!id.Value =“ Invoice2”,“ Plum” ,Fields!id.Value =“ Invoice3”,“ Orange”,TRUE,“ Aqua” )
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.