I want to add a LIKE filters with wildcards in SSRS report builder. I tried this using contains clause present in filter data section of report builder. I tried both '*' and '%', but of them failed.
I tried MyFieldName contains 2451 - this succeds MyFieldName contains 24* - this fails MyFieldName contains 24% - this fails
From below link I feel that this is an old problem with no solution till yet.
http://connect.microsoft.com/SQLServer/feedback/details/202792/ssrs-adding-like-filter-criteria-to-report-builder
What do you guys suggest?
Thanks
Ravi Gupta
You could use the InStr
function
=IIF(InStr(Fields!MyFieldName.Value, "2451"),TRUE,FALSE)
In SSRS we can't use Like
. Instead of which you can use Contains
.
IIF((MyFieldName).ToString().Contains("RequiredString"),"True","False)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With