how to use like with parameter in report

lawrence whittemore asked on February 3, 2021 16:46

Is it possible to use a parameter with like in the sql query of a report? I can't seem to get it to work.

Correct Answer

Liam Goldfinch answered on February 3, 2021 22:05

Hi Lawrence

When doing reports in Kentico, it is sometimes worth checking the out of the box reports, you might find a similar scenario.

E.g. The report under Page reports -> Content inventory report uses the following like condition:

WHERE (@name IS NULL OR DocumentName LIKE '%'+@name+'%')

Does this work for you?

1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.