Reputation: 103
I have a SSRS 2005 report with three parameters: @FromDate, @ToDate and @Period. @FromDate and @ToDate default to the first day and the last day of last month, respectively.
The @Period parameter is a multi-value parameter. So if I choose for instance "Current quarter", I want the @FromDate and @ToDate to change to the corresponding values based on the input in @Period.
My problem is not getting the correct datetime expressions, but rather how to make the parameters interact with each other as desired.
Upvotes: 4
Views: 15329
Reputation: 129
To achieve your requirement, we need use cascading parameters in SSRS.
In your scenario, you need create the parameter @FromDate that get values from a dataset which select FromDate based on the @Period parameter. Then create parameter @ToDate that get values from a dataset which select ToDate based on the @FromDate parameter.
The following document is for your reference: https://technet.microsoft.com/en-us/library/aa337498(v=sql.105).aspx
Upvotes: 5