

INNER JOIN ReportSchedule rsd ON cat.ItemID = rsd.ReportIDĪND rsd.SubscriptionID = sub.SubscriptionID Where cat.Name = ‘’ģ. INNER JOIN Subscriptions sub ON cat.ItemID = sub.Report_OID SELET cat.Name AS SSRSReport,rsd.ScheduleID You can get the subscription ID by querying like this in the ReportServer database: Once you create the subscription, an sql agent job will be created automatically.

Create a subscription of the report with any dummy parameter and email id. And each email id can be single email or multiple email id seperated by. You can customise it by addint CCEmail, BCCEmail etc. Create a table with columns for one or more parameter and ToEmail id. Also this can be used to keep a decent log of actions for each email delivery.ġ. Also we can initiate notification if a delivery fails. Another reason for using this everything can be encapsulate in SQL server and we will have full control over it. If we have few thousands of mail delivery and we may need to track the outgoing mails, this would be the best solution as we may be able to track the mails delivered and it is possible to resend if it got broken in between. Another reason for using this is tracking the delivery. This is a valid reason for using data driven subscription using TSQL. SSRS does have an inbuilt data driven subscription which is available only on Enterprise edition of SQL Server. Why do we need TSQL for data driven subscription ? Report has to use the information from table dynamically. We can have a table which contains parameter( s ) and email id. We can use data driven subscription in this case. But what will happen if we need to send the report to 1000 customers each one with different parameter and to different email id. This we can achieve by setting up 5 different subscriptions each one with each dept code as parameter and dept head’s email id as subscription email.

Suppose we need to send the same report to all department heads (say 5 people) each one should get the report in pdf which is rendered with their own dept code passed as parameters. Suppose if we want to deliver an SSRS report to a particular user every day at 6 Am in the morning, we can setup a subscription.
