Skip to Content

How to have multiple Y/N parameters affect the values used on a report

Please note that the application where the reports are run from do not support optional parameter so we have to use the (if parameter='Y' then field=values else 1=1) workaround.

I have 6 parameters which will display as checkboxes to the user (checked is yes, not is no). If they check say 4/6 checkboxes, I need the report to print for those 4 values and not the other 2. Basically I can't really use if parameter='Y' then field=value because I need it to include a list of values ie if 4 parameters have Y, then include values 1, 2, 3, 4 in the report selection. I need to somehow generate a value list from the parameters used then use that list in the report selection ie Field in (list)?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 16 at 09:09 AM

    Can you something like this, I have assumed all fields are strings so else = 2 single quotes and assumes '' is not a valid result, change else result depending on data type

    (Field1 = (If Param1 = 'Y' then Field1 else ''))

    Or

    (Field2 = (If Param2 = 'Y' then Field2 else ''))

    Or .....

    Not familiar with your data structure so this might not work

    Ian

    Add comment
    10|10000 characters needed characters exceeded