Suppressing a report if it contains no data

Hello everyone,

I am running out of ideas with this one so was wondering if anyone could help me.  I have a stored procedure that I need to run several times to pull off various details for several performances.  However, there will not always be data or shows to display anything on a report and I dont really want to send blank emails out to staff.

Is there anyway that I can suppress a report from running if there is no data to return or make it so that it is conditional based on a parameter?

Any help on this would be much appreciated!

Many Thanks,

Scott



[edited by: Scott Whitehouse at 3:57 AM (GMT -6) on 12 May 2011]
Parents
  • For the benefit of anyone finding this thread in the future:

    Two additional options would be customizing your report procedure to error out on certain criteria (though this will cause additional entries in T_APPLICATION_ERRORS whenever it "fails"), or creating a scheduled SQL Server job to actually create the report server queue entry for for a specific run, based on criteria in the SQL agent job. (This would allow you to still get your report formatting).

  • Hi Scott,

    I had exactly the same issue. I didn't want the user to get an email by default when quite often the report would contain no data.

    It wasn't very elegant, but I set up a scheduled task to check whether any orders (it was based on orders made by a particular level of Member) had been made and whether the customer had the Membership level. If the count was greater than 0 then it would trigger an SP which sent the email.

    I can send you the code, but it's not groundbreaking, once I had figured the logic.

    Debbie

Reply
  • Hi Scott,

    I had exactly the same issue. I didn't want the user to get an email by default when quite often the report would contain no data.

    It wasn't very elegant, but I set up a scheduled task to check whether any orders (it was based on orders made by a particular level of Member) had been made and whether the customer had the Membership level. If the count was greater than 0 then it would trigger an SP which sent the email.

    I can send you the code, but it's not groundbreaking, once I had figured the logic.

    Debbie

Children
No Data