I have a custom report in SQL Server Reporting Services. This report has a few parameters, like: Requested date start, Requested data to, donor.
I would like to setup a scheduled email. However I would like to assign the "Requested date start" value to = (current datetime-1 month) and assign the "Requested date end" value to = current datetime
Any tips on how to do this?
Standard and data-driven subscriptions Reporting Services supports two kinds of subscriptions: standard and data-driven. Standard subscriptions are created and managed by individual users. A standard subscription consists of static values that cannot be varied during subscription processing.
All query parameters can have corresponding report parameters. You pass a query parameter to a report by passing the corresponding report parameter. For more information, see Build a Query in the Relational Query Designer (Report Builder and SSRS). Report parameters are case-sensitive.
In the Report Data pane, expand the Parameters node, right-click the report parameter that was automatically created for the dataset parameter, and then click Parameter Properties. In the General tab, select Allow multiple values to allow a user to select more than one value for the parameter.
This is quite simple, see my answer here:
SQL Server: calculating date ranges
What you have to end up doing is creating these calculations as a dataset and then use the "Use Default" checkbox in the subscription itself:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With