I want to set up sending via email a SSRS report only when there is data in the report. It is actually an exception report which needs to send out only when there is an exception. The data for this is a stored procedure, and there are no parameters for this stored procedure. I just need to send the email with report when there is any data populated.
I tried the DDS in the SSRS but it did not work for me. Can anyone tell me how to do this ?
The stored procedure just returns results and does not update any table.
There are two CTEs in the Stored procedure and the last line of the query is-
select * from [desks_temporary_allocations_notifications][n] where dateadd(n,10,[notification_date]) > getdate()
This last part of the query returns values only when the where condition is met if the notification table is populated after 10 mins.
The result of this is mostly no rows. I set up a dds where for creating data set I need to write a query which I can't figure out which should only send a report when there is data in the report.
Can anyone help with this .