Skip to Content
0

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

Mar 15 at 05:47 PM

32

avatar image

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)?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Ian Waterman Mar 16 at 09:09 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

My apologies Ian. Your solution totally worked thank you!

0