2
votes

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.

1

1 Answers

4
votes

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