Export (0) Print
Expand All

Lesson 3: Defining a Data-Driven Subscription

In this lesson, you use the data-driven subscription pages to connect to a subscription data source, build a query that retrieves subscription data, and map the result set to report and delivery options.

NoteNote

Before you start, verify that SQL Server Agent service is running. If it is not running, you cannot save the subscription.

This lesson assumes you completed Lesson 1 and Lesson 2 and that the report data source uses stored credentials. For more information, see Lesson 2: Modifying the Report Data Source Properties

Start the Data-Driven Subscription Wizard

  1. In Report Manager, click Home, and navigate to the folder containing the Employee Sales Summary report. For example, AdventureWorks 2008 Sample Reports.

  2. Open the command menu for the Employee Sales Report.

  3. Click Manage.

  4. Click the Subscriptions tab.

  5. Click New Data-driven Subscription. If you do not see this button, you do not have Content Manager permissions.

Step 1 - Specify a description

  1. Type a description for the subscription.

  2. Select Windows FileShare for Specify how recipients are notified.

  3. Select Specify for this subscription only, and then click Next.

Step 2 - Specify a connection to the subscriber data source

  1. Select Microsoft SQL Server as the data source type.

  2. In Connection string, type the following connection string:

    data source=localhost; initial catalog=Subscribers
    
    NoteNote

    Subscribers is the database you created in lesson 1.

  3. Click Credentials stored securely in the report server.

  4. In User Name and Password, type your domain user name and password. Include both the domain and user account when specifying User Name.

    Important noteImportant

    Credentials used to connect to a subscriber data source are not passed back to Management Studio. If you modify the subscription later, you must retype the password used to connect to the data source.

  5. Select Use as windows credentials when connecting to the data source, and then click Next.

Step 3 - Define a query to retrieve subscriber data

  1. In the query pane, type the following query:

    Select * from UserInfo
    
  2. Specify a time-out of 30 seconds.

  3. Click Validate, and then click Next.

Step 4 - Set delivery options

  1. For File name, , select Get the value from the database. In Setting Value, select LastName.

  2. For Path, select Specify a static value. In Setting Value, type the name of a public file share for which you have write permissions (for example, \\mycomputer\public\myreports). If you not sure how to create a public folder, see How to: Create a Shared Folder for Report Server File Share Delivery.

  3. For Render Format, select Get the value from the database. Select Format.

  4. For Write mode, select Specify a static value. In Choose a value , select AutoIncrement. Click Next.

  5. For File Extension, select Specify a static value. In Choose a value, select True.

  6. For User name, select Specify a static value. Type your domain user account. Enter it in this format: <domain>\<account>.

  7. For Password, select Specify a static value. Type your password. Be sure that you type the password carefully. The wizard does not validate the password.

  8. Click Next.

Step 5 - Specify a parameter value to vary report output

  1. Use the default parameter values for Month and Year.

  2. For Employee, select Get the value from the database. In Value, select EmployeeID. Click Next.

Step 6 - To schedule a subscription

  1. Click On a schedule created for this subscription, and then click Next.

  2. In Schedule Details, click Once.

  3. Specify a start time that is a few minutes ahead of the current time.

  4. Click Finish.

When the subscription runs, three report files will be delivered to the file share you specified, one for each subscriber in the Subscribers data source. Each delivery should be unique in terms of data (the data should be employee-specific), rendering format, and file format. You can open each report from the shared folder to verify that each version is customized based on the subscription options you defined.

The subscription page in Report Manager will contain the Last Run date and Status of the subscription. The must refresh the page after the subscription runs to see the updated information.

This step concludes the tutorial "Defining a Data-Driven Subscription". To learn more about other Reporting Services tutorials, see How Do I Find Tutorials (Reporting Services).

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft