Dom Vito
Dom Vito

Reputation: 567

Multiple OR statements in SSRS expression

How can I have multiple OR statements in an SSRS expression? Seems to be giving me an error.

Here is what I have now: =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", "")

Upvotes: 0

Views: 9988

Answers (1)

alejandro zuleta
alejandro zuleta

Reputation: 14108

In SSRS use double quote for strings.

Try:

 =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", "")

Let me know if this helps.

Upvotes: 5

Related Questions