Skip to Content
0
Jul 11, 2019 at 06:04 PM

Crystal Reports: using "like" with "in"

314 Views

I have a report that uses below formula.

if {?Day_Night} = 'All' then
(({?Position}='ALL' or {Command.category2} like {?Position} & "*") and {?Day_Night}='All')
else if {?Day_Night}={command.day} then
(({?Position}='ALL' or {Command.category2} like {?Position} & "*") and {?Day_Night}={command.day})
else if {?Day_Night}={command.night} then
(({?Position}='ALL' or {Command.category2} like {?Position} & "*") and {?Day_Night}={command.night})

The {?Position} parameter was a single selection thus far, but now I need to change that to allow multiple selections. I tried substituting "like" with "in" and although there was no error, the report did not show any data. Is there a way to use array method while still allowing the report to use "like" or " * "?