SSRS表达式中的多个OR语句

时间:2016-06-21 16:37:50

标签: reporting-services ssrs-2008 ssrs-2008-r2 ssrs-2012 reportingservices-2005

如何在SSRS表达式中包含多个OR语句?似乎给了我一个错误。

以下是我现在所拥有的内容:=IIF((Fields!PART.Value LIKE '*A2*') or (Fields!PART.Value LIKE '*A3*') or (Fields!PART.Value LIKE '*A4*') or (Fields!PART.Value LIKE '*B2*') or (Fields!PART.Value LIKE '*B3*') or (Fields!PART.Value LIKE '*B4*') or (Fields!PART.Value LIKE '*C2*') or (Fields!PART.Value LIKE '*C3*') or (Fields!PART.Value LIKE '*C4*') or (Fields!PART.Value LIKE '*D2*') or (Fields!PART.Value LIKE '*D3*') or (Fields!PART.Value LIKE '*D4*'), "TOP", "")

1 个答案:

答案 0 :(得分:3)

在SSRS中使用字符串的双引号。

尝试:

 =IIF((Fields!PART.Value LIKE "*A2*") or (Fields!PART.Value LIKE "*A3*")
or (Fields!PART.Value LIKE "*A4*") or (Fields!PART.Value LIKE "*B2*")
or (Fields!PART.Value LIKE "*B3*") or (Fields!PART.Value LIKE "*B4*")
or (Fields!PART.Value LIKE "*C2*") or (Fields!PART.Value LIKE "*C3*")
or (Fields!PART.Value LIKE "*C4*") or (Fields!PART.Value LIKE "*D2*")
or (Fields!PART.Value LIKE "*D3*") or (Fields!PART.Value LIKE "*D4*"), "TOP", "")

如果有帮助,请告诉我。