user3394606
user3394606

Reputation: 13

Nested IIF statement

Having trouble with a IIF statement. Trying to print a line of text if the result does not match 2 criteria but I keep getting an error saying that an expression is expected

=IIF((Fields!item.Value LIKE '%ASR%') AND (Fields!item.Value LIKE '%SERVRC%'),Fields!item.Value, 'No Code')

Upvotes: 0

Views: 364

Answers (1)

Darren S
Darren S

Reputation: 940

Try this;

=IIF(InStr(Fields!item.Value, "ASR")>0 AND InStr(Fields!item.Value, "SERVRC")>0, Fields!item.Value, "No Code")

You cannot use SQL syntax in an Expression in Report Services.

You can find examples of the available functions within Report Builder and here; https://msdn.microsoft.com/en-us/library/ms157328.aspx#VisualBasicFunctions

Upvotes: 3

Related Questions