Subscriptions in SQL Server Reporting Services
Subscriptions automate the delivery of reports on a scheduled basis. SSRS supports two main types of subscriptions: Email and File Share. This page explains how to create, manage, and programmatically control subscriptions.
Email Subscriptions
File Share Subscriptions
API & PowerShell
Creating an Email Subscription
- Open Report Manager (or the web portal) and navigate to the desired report.
- Select Subscribe > New Subscription.
- Configure the following options:
- To: List of email addresses (semicolon separated).
- Subject: Use placeholders like
@ReportName. - Render format: PDF, Excel, Word, etc.
- Schedule: Define recurrence (daily, weekly, monthly).
- Click Apply to save the subscription.
Sample Email Subscription XML (RDL)
<Subscription>
<Description>Daily Sales Report</Description>
<EventType>TimedSubscription</EventType>
<MatchData>
<ScheduleDefinition>
<WeeklyRecurrence>
<DaysOfWeek>Monday,Tuesday,Wednesday,Thursday,Friday</DaysOfWeek>
<WeeksInterval>1</WeeksInterval>
</WeeklyRecurrence>
<StartDateTime>2025-01-01T07:00:00Z</StartDateTime>
</ScheduleDefinition>
</MatchData>
<DeliverySettings>
<ExtensionSettings>
<Extension>Report Server Email</Extension>
<ParameterValues>
<ParameterValue>
<Name>TO</Name>
<Value>sales@example.com</Value>
</ParameterValue>
<ParameterValue>
<Name>Subject</Name>
<Value>Daily Sales Report - @ReportName</Value>
</ParameterValue>
</ParameterValues>
</ExtensionSettings>
</DeliverySettings>
</Subscription>
Programmatic Management of Subscriptions
SSRS exposes a SOAP API (ReportService2010) and a REST API (/api/v2.0) for subscription operations.
REST Example: List Subscriptions for a Report
GET https://myrsserver/reportserver/api/v2.0/reports/Reports%2FSales%2FMonthlyReport/subscriptions
Authorization: Bearer <access-token>
Creating a Subscription via REST
POST https://myrsserver/reportserver/api/v2.0/reports/Reports%2FSales%2FMonthlyReport/subscriptions
Headers:
Content-Type: application/json
Authorization: Bearer <access-token>
Body:
{
"delivery": {
"extension": "Report Server Email",
"settings": {
"TO": "user@example.com",
"Subject": "Monthly Sales Report"
}
},
"schedule": {
"recurrence": "Monthly",
"daysOfMonth": [1],
"time": "08:00"
},
"renderFormat": "PDF"
}
C# Sample: Using ReportService2010
using System;
using ReportService2010;
class Program {
static void Main() {
var rs = new ReportingService2010SoapClient();
rs.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
var sub = new Subscription {
Owner = "DOMAIN\\user",
Description = "Weekly Report",
EventType = "TimedSubscription",
DeliverySettings = new ExtensionSettings {
Extension = "Report Server Email",
ParameterValues = new ParameterValue[] {
new ParameterValue { Name = "TO", Value = "user@example.com"},
new ParameterValue { Name = "Subject", Value = "Weekly Report"}
}
},
MatchData = "... "
};
string id = rs.CreateSubscription(sub, "/Sales/WeeklyReport", null);
Console.WriteLine($"Created subscription ID: {id}");
}
}