Tuesday, November 2, 2010

Creating a Data-driven Subscription in Report Services

To create a data-driven subscription in Reporting Services select the report and click on the Subscriptions tab, then click the New Data-driven Subscription button.



Step 1.
You will be asked to enter a description and a format in which to deliver the report. As shown below I have chosen to e-mail the report. I have also chosen to specify a shared data source. Click the Next button.



Step 2.
Select the shared data source for your report and click the Next button.



Step 3.
Since I only want to send this report if it contains data, I used SELECT TOP 1. I also specified an e-mail address to send the report to. The report will be sent to johnsmith@gmail.com. The rest of the select statement I copied from my original select statement that I used to create the report. Click the Validate button to make sure your sql is correct, then click the Next button.



Step 4.
To send the e-mail to John Smith, choose the 'Get the value from the database:' radio button and select Mailto since that is the variable name used in the previous sql statement. Choose to include the report and select the format in which the user will view the report. I have chosen to send the user an Excel document. Click the Next button at the bottom of the page.



Step 5.
If the report contains parameters you will need to specify them at this time. They can be static variables or they can be chosen from the sql statement entered earlier.

Step 6.
To set a schedule, click the ‘On a schedule created for this subscription’ radio button.



Step 7.
I have chosen to send this report Monday through Friday at 7:00 am. Click the Finished button.

No comments:

Post a Comment