The first stage is to create a new parameter, in this case, called LimitEstablishmentParameter.
I've decided to limit the number of parameters available for selection using the following code in Default Value for the LimitEstablishmentParameter.
=iif(Parameters!EstablishmentParameter.count<=20,Parameters!EstablishmentParameter.value,"xxx")
Where xxx is a value that will return zero records from the dataset.
Change your dataset to refer to your new 'limiting' multi-valued parameter (LimitEstablishmentParameter in this case).
It's also worth putting a textbox near the top of the report with an expression similar to the following, informing the user of the selection limit:
=iif(Parameters!LimitEstablishmentParameter.Value(0)="xxx","The selection is limited to 20 establishments.",(Join(Parameters!EstablishmentParameter.Value, ", ")))
2 comments:
To add a'Null' to the available multi-valued parameter list, look here
An updated post that alters and improves the efficiency of the main dataset query if the user checks 'Select All' is here
Post a Comment