crystal-reportscrystal-reports-formulas

Crystal Reports multiple "like" conditions


I have the following statement:

    IF {?USER} = "BOB" 
THEN {TABLE.CODE} like "A" or {TABLE.CODE} like "B" or {TABLE.CODE} like "C"

I'm wondering if there's a way to shorten all the conditions to the right of the "LIKE" function? It can get very hard to manage for conditions where I have many codes.

Thank you!


Solution

  • try this:

    IF {?USER} = "BOB" 
    THEN {TABLE.CODE} IN ["A", "B", "C"]