LIKE search requested from user

Stimulsoft Reports.PHP discussion
Post Reply
brightsg
Posts: 5
Joined: Wed Aug 28, 2024 12:33 pm

LIKE search requested from user

Post by brightsg »

How can I request a Variable from the user and then execute the filter LIKE the supplied Value?

So, I create a string variable 'SearchName' and set to request from user, what do I need to put in the filter in the databand on the report to filter the CompanyName column?

I have tried SearchName.Contains(CompanyName) and CompanyName.Contains(SearchName) neither work. I know how to do this picking a value from a list, but I want the user to be bale to type a partial name and find matches.

Thanks
Lech Kulikowski
Posts: 7019
Joined: Tue Mar 20, 2018 5:34 am

Re: LIKE search requested from user

Post by Lech Kulikowski »

Hello,

You can use the following expression:
ToLowerCase(DataSourceName.ColumnName).Contains(ToLowerCase(VariableName))

Thank you.
Attachments
ContainsSample.mrt
(675.59 KiB) Downloaded 105 times
Post Reply