How do I make wildcards work in a like operator in SQL Server reporting services?

David Silva Smith picture David Silva Smith · Feb 4, 2011 · Viewed 51.8k times · Source

I have added a filter expression using the like operator. What do I put in the value field? my parameter is named @test and I'd like the filter to function as a like %@test% would in SQL. I want it to act like %@test% so I can pass '' to get all values for the query.

Answer

David Silva Smith picture David Silva Smith · Feb 4, 2011

I got this to work by adding a filter expression with a like operator and setting the value to this:

="*" + Parameters!Roles.Value + "*"

To get all values I pass ''.