[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1022
  • Last Modified:

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.
0
Grffster
Asked:
Grffster
  • 2
  • 2
1 Solution
 
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
 
shorakCommented:
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
 
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now