question

AlexKlap avatar image
AlexKlap asked

SSRS Subscription Execution control

Hello All Great People. I'm seeking your help once again. I have created an SSRS report and a subscription for it. I have received a request that the subscription should only run when data is available in table, and after the report has executed the source table should get truncated. The report should run again when new a set of data is inserted into the table manually again. Please help me with this. Thank you for your valuable support.
ssrssubscriptionsdata-driven-subscriptions
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
GPO avatar image
GPO answered
Hi Alex, what you're after might be a data driven subscription. There's a good tutorial on it here: http://msdn.microsoft.com/en-AU/library/ms169673(v=sql.105).aspx Regarding the issue of only sending out the report when there's data in the table, there are a couple of ways you could go about this. If it's not critical that the report be sent out the very minute that the table is populated, you could set up your DDS to check the table, say once a day. If data, send report. There is a good example here of how to trigger the process in the Agent job that sets off the subscription. They've used SSIS as the trigger but it could be a stored procedure or another agent job or whatever. http://www.sqlservercentral.com/articles/Integration+Services+(SSIS)/96275/
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.