Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 email SSRS subscription only when there is data

Author  Topic 

joe8079
Posting Yak Master

127 Posts

Posted - 2012-06-30 : 12:19:17
I have a subscription that is set up to be emailed every 15 minutes, but I want the subscription to only be sent if there is data. Does anyone how could I set this up or where I could go for more information? I tried looking online but couldn't really find anything useful.

Thanks,

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-07-01 : 01:10:52
do this via scheduled sql job. Initial step populate report data onto a table. second step check if count is > 0 in table and set a variable accordingly (1 or 0). third set call code to render report by checking if value of field = 1

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-07-01 : 01:13:24
see how you can render report programatically


http://sqlblog.com/blogs/roman_rehak/archive/2009/06/12/ssrs-report-rendering-from-command-prompt.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -