Conditional Schedule of report via Email (using Subscriptions )
I have report which i have schedule via email which attach excel to email and sent to receptive persons. Can any one please help me in finding out the way if generated excel report is empty in that case it should not run the schedule and should not throw email to those? Deepak
June 15th, 2011 2:10pm

Hi Deepak1983, Thanks for your question. Based on your description, I understand that if the report has no data, you want to prevent attach excel to email and sent to receptive persons. As we know, there are two basic type for the Subscription, stand Subscription and Data-Driven Subscription. Generally speaking, it is hard to control the delivery job to skip some time running in the stand Subscription type. In order to achieve this requirement, I will give you one work around solution with a Data-Driven Subscription. Commonly, if using a Data-Driven for the Subscription, we can configure the Subscription’s parameters with the result by executing Data-Driven’s T-SQL query. Most of the time this query simply return rows for the Subscription, we just modify this query so that it also filters the result based on whether or not the report itself will return rows. For example, assume that one of the Dataset’s fields is SomeField, the T-SQL query’s search is SomeField >10, you can type your Data-Driven query just like this, SELECT * from DataDrivenSubscriptionInfoTable WHERE EXISTS(SELECT SomeField FROM TheDataSourceTable WHERE SomeField >10) After you provide this query to the Subscription, the delivery job will stop run if the report is NULL. For more detail information about Creating, Modifying, and Deleting Data-Driven Subscriptions, please see: http://msdn.microsoft.com/en-us/library/ms156012(v=SQL.90).aspx. If you have any other question, please feel free to let me know. Thanks, Sharp Wang Best Regards. Sharp Wang
Free Windows Admin Tool Kit Click here and download it now
June 16th, 2011 9:21pm

Hi Deepak, A very Similar Thread has been posted here. http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/247af805-9d3a-4b55-b340-1702f6173d1f/ Rakesh M J Dont forget to mark it as Answered if found useful MCTS,MCITP,MCSS http://mycubeandreports.blogspot.com/
June 16th, 2011 11:36pm

If you're not using SQL Server Enterprise Edition and you'd like to mimic data-driven subscriptions, have a read of the following. I believe this still works for SQL Server 2008 http://sqlblog.com/blogs/greg_low/archive/2008/08/13/data-driven-subscriptions-in-sql-server-2005-standard-edition.aspxJeff Wharton MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt) MCT, MCPD, MCITP, MCDBA Blog: Mr. Wharty's Ramblings Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
Free Windows Admin Tool Kit Click here and download it now
June 17th, 2011 12:16am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics