简体   繁体   中英

Set up two SSRS subscriptions with different date ranges for one report's stored procedure

I have a report whose stored procedure takes from/to date range parameters. I need to set up subscriptions to run the report daily for the previous day and monthly for the previous month. SSRS subscription setup only allows the default (if set in the RDL) and manual dates.

The only way I can figure out to run the same report on two different date ranges is to duplicate the RDL, then default one RDL's from/to dates to the previous day and set up a subscription for that one to run daily; then set the other RDL to default to the previous month and set up a subscription for that to run monthly.

Is there an easier way to do this?

Just create a hidden parameter where you can specify if it's the daily subscription, monthly subscription or no subscription. Based on the value of this parameter you can make the other parameters have a different default value.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM