Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server Reporting Services Subscription with dynamic parameters

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?

enter image description here

like image 839
aron Avatar asked Oct 26 '11 18:10

aron


People also ask

What are the two methods of delivery for report subscriptions?

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.

Can we pass parameter in SSRS?

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.

How do I pass multiple values to a parameter in SSRS?

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.


1 Answers

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:

enter image description here

like image 126
JonH Avatar answered Oct 10 '22 05:10

JonH