Data-driven report subscriptions on SQL Server 2005 Standard Edition to stop reports being sent with no data

It looks like Data-driven subscriptions are only available on Enterprise and Developer editions of SQL Server 2005. As a result, I don't know of a way of stopping reports that run from a view (so no parameters) to be emailed by subscription if there's no detail records in the resulting table (the view's execution result). There's a number of blogs out there showing how to send reports to mutliple parties that have different parameter settings for a report, but none to check on whether any results to be displayed before send.
GrffsterAsked:
Who is Participating?
 
shorakConnect With a Mentor Commented:
Hi..

part of the data-driven subscription involves writing some sql code that generates parameter values that are used in the report or the recipients emails for the subscription. You could use that sqL code to check if there is any data being returned by the query used in the actual report by including the code in a case statement and if null is returned then set the email as a dummy email address else set the email with the proper recipients

Rob
0
 
shorakCommented:
Hi.. unfortunately, you cant prevent a report from being sent without using a data-driven subscription and even with a data driven subscription, it will stil send an email even if there is no data but you get around by checking for data and if there is nothing then sending the email to a fake account else sending it to the proper recipients.

There is nothing in the subscription functionality that will check the data being retrieved in the report.

Rob
0
 
GrffsterAuthor Commented:
Is what you're saying here only available in data-driven subscription then re: sending to a fake account? As a matter of interest, how do you do this please in data-driven subscriptions?
0
 
GrffsterAuthor Commented:
Shame Microsoft haven't thought of a genuine solution to this as I'd imagine many people would require this functionality! Never mind...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.