| title | Lesson 3: Defining a Data-Driven Subscription | Microsoft Docs |
|---|---|
| ms.date | 06/06/2019 |
| ms.prod | reporting-services |
| ms.prod_service | reporting-services-native |
| ms.technology | reporting-services |
| ms.topic | conceptual |
| ms.assetid | 89197b9b-7502-4fe2-bea3-ed7943eebf3b |
| author | maggiesMSFT |
| ms.author | maggies |
In this [!INCLUDEssRSnoversion_md] tutorial lesson, you use the [!INCLUDEssRSnoversion] web portal's 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.
Note
Before you start, verify that [!INCLUDEssNoVersion] Agent service is running. If it is not running, you cannot save the subscription. One method for verification is to open the SQL Server Configuration Manager. 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
-
In [!INCLUDEssRSnoversion_md] web portal, click Home, and navigate to the folder containing the Sales Orders report.
-
In the context menu
of the report, click Manage, and then click Subscriptions in the left pane. -
Click + New Subscription. If you do not see this button, you do not have Content Manager permissions.
- Type Sales Order delivery in description.
- click Data-driven subscription..
- In the schedule section click Report-specific schedule.
- Click Edit schedule.
- In Schedule Details, click Once.
- Specify a start time that is a few minutes ahead of the current time.
- Specify the Start and end dates.
- Select Apply.
- In the Destination section, Select Windows File Share for the method of delivery.
-
click Edit Dataset.
-
Select A custom data source.
-
Select Microsoft SQL Server as the data source Connection type.
-
In Connection string, type the following connection string. Subscribers is the database you created in lesson 1.
data source=localhost; initial catalog=Subscribers
- Select Using the following credentials.
- Select Windows user name and password.
- In User Name and Password, type your domain user name and password. Include both the domain and user account when specifying User Name.
Note
Credentials used to connect to a subscriber data source are not passed back to [!INCLUDEssManStudio]. If you modify the subscription later, you must retype the password used to connect to the data source.
-
In the query box, type the following query:
Select * from OrderInfo -
Specify a time-out of 30 seconds.
-
Click Validate query, and then click Apply.
Fill in the following values:
| Parameter | Source of value | Value/field |
|---|---|---|
| File name | Get value from dataset | Order |
| Path | Enter value | In the Value, type the name of a public file share for which you have write permissions (for example, \\mycomputer\public\myreports). |
| Render Format | Get value from dataset | Format |
| Write mode | Enter value | Autoincrement |
| File Extension | Enter value | True |
| User Name | Enter value | Type your domain user account. Enter it in this format: <domain>\<account>. The user account needs to have permissions to the path you configured. |
| Password | Enter value | Type your password |
| Use file share account | Enter value | False |
- In the OrderNumber field , select Get value from dataset. In Value, select Order.
- Select Create Subscription.
When the subscription runs, four report files will be delivered to the file share you specified, one for each order in the Subscribers data source. Each delivery should be unique in terms of data (the data should be order-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 the web portal will contain the Last Run date and Status of the subscription.
Note
Refresh the page after the subscription runs to see the updated information.
This step concludes the tutorial "Define a Data-Driven Subscription".
Subscriptions and Delivery (Reporting Services)
Data-Driven Subscriptions
Create, Modify, and Delete Data-Driven Subscriptions
Use an External Data Source for Subscriber Data (Data-Driven Subscription)

