'SSRS Cascading Params without a dataset

I've done many a cascading param in SSRS but ALL have used datasets, passing in a param value into a query, this time I want to know if a date selection can be done using only expressions.

Periodtype parameter has a value list of 'Day' Or 'Quarter' (those are the labels, the values are "D" and "Q").

I've set the default values of the start and end dates via SSRS expression if periodtype value is "D" then set start and end date to be beginning and end of previous day and if "Q" then similar with previous quarter.

This works when you start up the report, changing the default period type (D or Q).

It won't allow the date to be calculated dynamically when changing the periodtype, can it be done without queries, using just params and expressions, thank-you?



Solution 1:[1]

If I've understood your question correctly, I think the issue is not so much to do with datasets, but a long standing issue with SSRS not refreshing parameters, or at least the defaults, even if you specify to always refresh it.

Typically you can force the update by changes the available values.

As an example ...

I set up 2 parameters, the first called PeriodType is a simple text parameter with two available values "Q" and "D", it also has a default value of "D"

The second parameter called StartDate is a Date/Time type.

The following three properties were all set to the exact same expression

Available Values: Specify Values - Label and Value properties

Default Values: Specify Values - Value property

enter image description here

enter image description here

Here is the expression which simply shows todays date if "D" is chosen or the 1st Jan if Q is chosen purely for illustration.

=IIF(Parameters!PeriodType.Value = "D", today(), CDATE("2022-01-01"))

I also set the advanced properties "Always Refresh" option.

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Alan Schofield