SSRS Subscription - Conditional sending an E-mail
Hi, I whold like to alert my users only if the report conatains data Can I set the subscription to send a report only if there is data? also is SQL Job can send a SSRS report?
November 1st, 2010 6:41am

Hi, When an SSRS subscription is created, a corresponding SQL job is automatically created in the ReportServer database. This job is scheduled as per the schedule given during the subscription setup. This job runs as per this schedule and sends the reports to the subscribers. Hence, answering to your 2nd question - it is actually a SQL job that sends the reports to the subscribers. For your 1st question - you will have to find this SQL job (using the SQL Server Management Studio) and then edit the step that sends an email to include a condition wherein you check if the dataset returns any records and if so, send the mail otherwise don't do anything. I haven't tried this before but you could check and let us know in case it doesn't work. Regards, ShalinShalin P. Kapadia
Free Windows Admin Tool Kit Click here and download it now
November 1st, 2010 9:56am

Hi, As Shalin posted, when a subscription is created, Reporting Services creates a SQL Server Agent job which is executed according to the required schedule. However, accessing the Report Server database is always not recommended. By generally, in order to send reports only if report data exists, we can customize a Data-Driven subscription with the report dataset. Please refer to this blog http://blogs.msdn.com/b/bimusings/archive/2005/07/29/445080.aspx For more information about Data-Driven Subscriptions, please see: http://msdn.microsoft.com/en-us/library/ms159150.aspx Thanks, Tony ChainPlease remember to mark the replies as answers if they help and unmark them if they provide no help
November 3rd, 2010 2:35am

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

Other recent topics Other recent topics