Halt Email Subscription when No Data

  • I've built a subscription to send a tailored exception report to each of our regional offices each month. However I don't want to send one a blank list if there are no exceptions for that region. Anyone know of a way to do this?

  • Are you using data driven subscriptions?  If so, you could modify your query that returns the subscriber list, effectively filtering the list based on a count of exceptions.  It does mean that you're effectively running your primary data query twice, so hopefully it's not too intensive.

    Steve.

  • Yes, this occured to me later in the day and it does work. However I'm still one step away from getting this completely working. The single report parameter I'm specifying in the subscription is coming up with 'invalid values' despite the fact that it comes out correctly in the comments/message body section of the emails that are getting sent out. Maybe some string/integer conversion problem somewhere...

  • In data region properties there is 'norows', you can write whatever message you want to send to your users in 'norows' when no data is returned to your query. That way its not going to be empty.

  • Yes, the problem is though that I don't want to send an email at all if there are no rows to display. In the end I used a stored procedure to get the rows and update a field ('data_exists') in the table of email addresses.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply