SQL Server Reporting Services Subscription with dynamic parameters

19,967

Solution 1

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

Solution 2

Write a stored procedure and get the following from the sql in the stored proc:

select @FileName  as FILENAME, @PATH as PATH, 'EXCEL' as RENDER_FORMAT , 'Overwrite' as WRITEMODE, 
'True'  as FILEEXTN , 'null' as USERNAME, 'null' as PASSWORD

Call the proc from the subscription

Anil Madan

Share:
19,967
aron
Author by

aron

Updated on June 05, 2022

Comments

  • aron
    aron almost 2 years

    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