Create a Data-Driven Subscription (SSRS Tutorial)
This Reporting Services tutorial teaches you the concepts of data-driven subscriptions by walking you through a simple example that creates a data-driven subscription to generate and save filtered report output to a file share. Reporting Services data-driven subscriptions allow you to customize and automate the distribution of a report based on dynamic subscriber data. Data-driven subscriptions are intended for the following kinds of scenarios:
Distributing reports to a large recipient pool whose membership may change from one distribution to the next. For example, email a monthly report to all current customers.
Distributing reports to a specific group of recipients based on predefined criteria. For example, send a sales performance report to all of the sales managers in an organization.
- Automate the generation of reports in a wide variety of formats, for example .xlsx and .pdf.
What You Will Learn
This tutorial is divided into three lessons:
|Lesson 1: Create a Sample Subscriber Database||In this lesson you will create a table local SQL Server database that contains subscriber information. the information Order Numbers to use for filtering and output file formats.|
|Lesson 2: Configure Report Data Source Properties||In this lesson, you will configure a report data source so that the report can run unattended on a schedule. Unattended processing requires stored credentials. You will also modify the report dataset to include a parameter that is supplied by the subscriber data. This parameter is used to filter the report data based on order number.|
|Lesson 3: Define a Data-Driven Subscription||In this lesson you will create a data-driven subscription. This lesson guides you through each page in the Data-Driven Subscription Wizard.|
The following diagram illustrates the basic workflow of the tutorial:
|(1)||The subscription configuration notes the source report, schedule, and the field mapping to the subscribers Database.|
|(2)||The OrderInfo table contains 4 order numbers to use for filtering, 1 per file. The table also contains the file formats for the generated reports.|
|(3)||Information from the Adventureworks database is filtered and return in the report.|
|(4)||The reports are created in the file formats specified in the Orderinfo table.|
Data-driven subscriptions are typically created and maintained by report server administrators. The steps to create data-driven subscriptions require building queries, knowledge of data sources that contain subscriber data, and elevated permissions on a report server.
The tutorial uses the Sales order report created in the tutorial Create a Basic Table Report (SSRS Tutorial) and data from the sample database AdventureWorks2014.
Your computer must have the following installed to use this tutorial:
An edition of SQL Server that supports data-driven subscriptions. For more information, see Editions and Features of SQL Server 2017.
The report server must be running in native mode. The user interface described in this tutorial is based on a native mode report server. Subscriptions are supported on SharePoint mode report servers but the user interface will be different than what is described in this tutorial.
SQL Server Agent service must be running.
A report that includes parameters. This tutorial assumes the sample report,
Sales Ordersyou create using the tutorial Create a Basic Table Report (SSRS Tutorial).
The AdventureWorks2014 sample database, which provides data to the sample report.
A Reporting Services role assignment that includes the Manage all subscriptions task on the sample report. This task is required for defining a data-driven subscription. If you are an administrator on the computer, the default role assignment for local administrators provides the permissions necessary for creating data-driven subscriptions. For more information, see Granting Permissions on a Native Mode Report Server.
A shared folder for which you have write permissions. The shared folder must be accessible over a network connection.
Estimated time to complete the tutorial: 30 minutes. An additional 30 minutes if you have not completed the basic report tutorial.
Create a Basic Table Report (SSRS Tutorial)