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.
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.