简体   繁体   中英

SSRS Report subscription scheduling with flexible dates

I have a set of reports that are being updated 4 times a month on set dates; on 1,9,16 and 24th. When any of these dates occur on weekends the updating will be done the next monday. Now I'm working on a schedule that will send emails to persons once the report has been updated, and the problem is those weekends. Can I somehow script the schedule to skip dates on weekends and do it on the next monday instead?

You can do this using a data-driven subscription. You'll need to write a SQL query that checks the current day and determines if it's one of these cases or not. Have the query return the email addresses you want to send to if it's a valid day.

Then in the "To" field for the subscription you can reference the field from the query. Set it to run every day. The subscription will run that query every day and deliver the email only when the conditions are true.

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