How to pass "like" or "Contains" parameters to fetchXML in ssrs report

Vishnu picture Vishnu · Jun 27, 2013 · Viewed 7.5k times · Source

I tried to pass parameter to fetch XML for generating report.

It works fine for "Text Equals" field. But does not works for "Contains" .

I tried this but it doest work.

<condition attribute="new_owner_lead" operator="like" value="@ParameterName"  />

also tried this

value='%"+@ParameterName+"%'
value='%@ParameterName%'

but it doesnt work.. Can Any one suggest.

Thanks in advance.

Answer

Jake1164 picture Jake1164 · Jun 27, 2013

Go into the properties of the dataset and click on the Parameters "tab". Enter the following for your parameter value: ="%" & Parameters!myParameter.Value & "%"

Then use the standard value for a parameter in the condition value: