Link to home
Start Free TrialLog in
Avatar of goodmanro
goodmanroFlag for United States of America

asked on

Suppressing Blank Reports from SSRS Data Driven Subscription

I am using the data-driven subscription feature of SQL Server Enterprise.  My subscription is setup and working nicely; however, I'd like to suppress reports that have no data in the primary data table in the report.

When setting up the subscribers in the subscription, I pull the data from Data Set 1.  The report data actually pulls from Data Set 2 (located on a different server).  Is there a way to cross reference the number of results returned from the primary report data set (Data Set 2) when setting up the subscriber list?  The Subscriber list is also located in the SSRS report server database...I tried using the Execution Log to view the RowCount, but this doesn't work when the subscription is sent out as an Excel attachment.

Any thoughts out there?  Thank you in advance.
ASKER CERTIFIED SOLUTION
Avatar of Jason Yousef
Jason Yousef
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of goodmanro

ASKER

Thanks huslayer...this is helpful.  In your example, the SQL code in the SQL Agent Job simply does a count on a standard table.  Is there a way to pass a parameter to the SQL Agent Job to do something like this?

SELECT * FROM Table2 WHERE EmailAddress = @EmailTo

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Great! see you again in another SSRS question.

Regards,
Jason
The solution that I found was not recommended by others and solved the problem.  I have marked my own solution so that it may be shared with others that face a similar challenge.