Reputation: 13
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
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