Wednesday, March 7, 2012

Don't send subscription if no data on report

I am fairly new to Reporting Services. That said I have created a
report that runs daily and via a subscription sends the report as
email. This works fine day in and day out, however some days there is
no data for the report. On the days when the report contains no data I
don't want a blank report sent to the subscribers, I prefer that they
get nothing. Is this out of the box functionality and I'm just not
finding it or is it coding I need to do? Much thanks to anyone willing
to point me in the right direction.
Amy Slankard
aslankard@.alumni.cofc.eduI don't think that functionality is built in but my way of handling it
is to include something in the subscription query that returns an
empty query if there is no data in the report. Nothing bad happens if
the subscription query returns no subscribers, just nothing gets sent.
It means including some form of the actual report query in the
subscription query so depending on how complex things are that may or
may not be a very practical or efficient way to go. My situation needs
some fairly heavy preprocessing that runs using the SQL Server Agent
in the early morning which among other things, sets a bit flag in a
table to say whether or not there is any data to report. My report
that runs some time later then includes that flag in its subscription
query.
Cheers
Ross
On 30 Mar 2005 06:50:27 -0800, "aslankard@.alumni.cofc.edu"
<amy.slankard@.gmail.com> wrote:
>I am fairly new to Reporting Services. That said I have created a
>report that runs daily and via a subscription sends the report as
>email. This works fine day in and day out, however some days there is
>no data for the report. On the days when the report contains no data I
>don't want a blank report sent to the subscribers, I prefer that they
>get nothing. Is this out of the box functionality and I'm just not
>finding it or is it coding I need to do? Much thanks to anyone willing
>to point me in the right direction.
>Amy Slankard
>aslankard@.alumni.cofc.edu

No comments:

Post a Comment