Pro SQL Server 2012 Reporting Services

(sharon) #1
CHAPTER 10  MANAGING REPORTS

 Note The data in the Activity table is static and therefore may not work as expected when you use the


GETDATE() function, as there may be no rows to return at the time you run the query. You can easily update the


activity dates to be reflective of your current datetime or change the query itself to go back (n) days where n


represents the number of days to go back in time.


Table 10-1. Output of a Data-Driven Query


EmployeeTbllD E-mail UserLogin ActivityDate


15 [email protected] hwci\Nursec 2011-08-15


34 [email protected] hwci\Lottah 2011-08-15


44 [email protected] hwci\MaryElizah 2011-08-15


147 [email protected] hwci\Fayel 2011-08-15


155 [email protected] hwci\brendanl 2011-08-15


159 [email protected] hwci\Ethanl 2011-08-15


Creating the Data-Driven Subscription


Now we will show the procedure for creating the data-driven subscription in Report Manager. The Daily
Activity report is included in the Pro_SSRS report project available in the Source Code area of the Apress
Web site. You can deploy the report to any folder on your report server for testing the subscription. Make
sure when you deploy the report that you modify the Pro_SSRS data source that is deployed with the
report so that it stores the credentials on the report server, which is required for the subscription to be
created. Open the browser, and navigate to the Daily Activity report, and from there select click the
down arrow and select Manage. Once you’re on the report properties page, select the Subscriptions tab
on the left. On the toolbar, select New Data-Driven Subscription. Follow these steps to complete the
data-driven subscription:



  1. Choose a name, delivery method, and data source type.

  2. Choose the data source location or define a new data source.

  3. Choose the command or query to return a list of recipients.

  4. Choose the settings for the E-mail delivery extension.

  5. Choose the report parameters.

  6. Choose when the subscription will be processed.

  7. Set up a schedule for the report.

Free download pdf