Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7840305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:44:09+00:00 2026-06-02T15:44:09+00:00

I have Reporting Services running on SQL 2008 R2 and have a handful of

  • 0

I have Reporting Services running on SQL 2008 R2 and have a handful of reports that I created. I’m able to go into Report Server and set up a subscription and have any of the reports emailed to an email address. So all of that is configured correctly.

What I want to do is have a web page in my application that shows a list of available reports. The user can choose one, choose a schedule frequency, enter an email address, and click a ‘save’ button. When clicking save it should create the subscription in SSRS. I may need to pass in a couple report parameters depending on the report.

How can I do this in C#?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T15:44:11+00:00Added an answer on June 2, 2026 at 3:44 pm

    You can dynamically generate a one time subscription in SSRS for the report. You’ll have to use the RS webservice as mentioned by Diego.

    Your code would look something like this:

    static void generateSubscription()
    {
        if (SubscriptionRequests.Count < 1) return;
    
        NetworkCredential credentials = new NetworkCredential("user", "pass");
        reports.ReportingService2005 rs = new reports.ReportingService2005();
        rs.Credentials = credentials;
        DateTime topDatetime = DateTime.Now;
        topDatetime = topDatetime.AddMinutes(2);
    
        foreach (SubscriptionRequest x in SubscriptionRequests)
        {
            reports.ExtensionSettings extensionSettings = new reports.ExtensionSettings();
            List<reports.ParameterValue> extParameters = new List<reports.ParameterValue>();
            List<reports.ParameterValue> parameters = new List<reports.ParameterValue>();
            string description = "Email: ";
            string eventType = "TimedSubscription";
            extensionSettings.Extension = "Report Server Email";
    
            string scheduleXml = "<ScheduleDefinition><StartDateTime>";
            scheduleXml += topDatetime.ToShortDateString() + " " + topDatetime.ToShortTimeString();
            scheduleXml += "</StartDateTime></ScheduleDefinition>";
    
            parameters.Add(new reports.ParameterValue() { Name = "abc", Value = x.id });
    
    
            extParameters.Add(new reports.ParameterValue() { Name = "RenderFormat", Value = x.renderFormat });
            extParameters.Add(new reports.ParameterValue() { Name = "TO", Value = x.email });
            extParameters.Add(new reports.ParameterValue() { Name = "ReplyTo", Value = x.replyTo });
            extParameters.Add(new reports.ParameterValue() { Name = "IncludeReport", Value = "True" });
            extParameters.Add(new reports.ParameterValue() { Name = "Subject", Value = "subject - " + " (" + x.id.ToString() + ")" });
    
            extParameters.Add(new reports.ParameterValue() { Name = "Comment", Value = x.body });
            extensionSettings.ParameterValues = extParameters.ToArray();
    
            description += topDatetime.ToShortDateString() + " " + topDatetime.ToShortTimeString();
            description += " (" + x.a + " - " + x.b + " - " + x.c + ")";
            string _reportName = "/report";
            rs.CreateSubscription(_reportName, extensionSettings, description, eventType, scheduleXml, parameters.ToArray());
            topDatetime = topDatetime.AddSeconds(30);
        }           
    }  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a report that I created in SQL Server Reporting Services 2008. I
I have an SQL Server Reporting Services (SSRS) report, that uses a view. That
I have SQL Reporting Services 2005 running on a Win 2008 server with IIS7.
I have a SQL Server Reporting Services report with an embedded image in the
I have just installed SQL Server 2008 including Reporting Services on Windows Server 2003.
I have a few SSRS reports running on SQL Server 2008 Web Edition SP1
I have a reporting services project with lots of reports developed in SQL server
We have some SQL server reporting services reports. I didn't write then but I
I am running SQL Server Reporting Services on SQL Server 2008 Standard and trying
I am running SQL Server 2008 R2 Express with Advanced Services, with Reporting Services

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.