Forum Discussion
Handling Multi-Value Parameters with Optional Blanks in Microsoft Report Builder
Thanks for divyed's concern about this issue.
Hi, doodlez
A multi-value parameter cannot include null values:
Perhaps you could set a default value for the parameter - set the parameter to all values of the field by default, so that you don't need to set the parameter, but at the same time you can select the desired value for the data query as required:
Parameter_OrderName is the dataset used to get the parameter OrderName:
When you run the report, it will default to select Select All:
You can select the desired value for the data query as required:
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AND (a.terminal_key IN (:terminal_key) OR :terminal_key IS NULL OR :terminal_key = '') -
If I write this, the report returns all records without filtering by terminal_key
when none is selected. However, if I choose multiple values for terminal_key,
the report fails to run.
AND a.terminal_key IN (:terminal_key)
If I write this, I can run the report and select multiple values for terminal_key. However,
if the parameter is not selected or, the report does not return records.
I can not mix this 2 together, I want both: choose multiple values and also avoid dependency.