问题
In MS SQL Server Report Builder 3.0, I have an SSRS report with 3 parameters:
My Stored Procedure needs either a Date Range OR the last number of days, not all 3 (they are set to NULL by default).
I want to be able to toggle a parameters NULL checkbox (tick/untick) based on the value of another parameter, eg: last # days has NULL ticked, then untick NULL checkboxes for the date range (start & end date) & vice versa. Any ideas on how to do this please?
Thanks in advance.
回答1:
The checkbox for a parameter to allow NULLs can only be set at design-time. You can't have it checked/unchecked depending on other parameters or user action.
The only way to handle your requirement is to allow all three parameters to be NULL, and have your stored procedure return an error message when the user doesn't meet at least one of the required conditions.
来源:https://stackoverflow.com/questions/30115255/ssrs-parameters-toggle-a-parameters-null-checkbox-depending-on-value-other-pa