Thursday, March 22, 2012

Date parameters in subscriptions

I have a standard on-demand report that now also needs to be e-mailed to a group of clerks. No problem there as I have several subscriptions in place already, however, they want this subscription to report from the system date to three days in the past. I could clone the report and change the date range to @.Startdate= GETDATE()-3 and @.Enddate = GETDATE() but then I would have to manage multiple reports that return the same thing. Is there a method in the date parameter field in subscriptions that can achieve the same thing?

Any ideas?

|||

There are 2 ways to do this:

1) change the parameter values for the report similar to what you were doing

2) use a data driven subscription with a 'dummy' query such as:

select pseudoDate1 as Start, pseudoDate2 as End

Then map the dates that are returned by the query to the report parameters.

-Lukasz

You'll have to write the query against your preferred data source.

No comments:

Post a Comment