SSRs Getting Started (eight) report subscriptions advanced

Source: Internet
Author: User
Tags mail visual studio

The previous article describes how to subscribe to a report as a shared directory in SSRS. Because SSRS is special to subscribe to a report in the form of a message, this article describes how to implement a report mail subscription in a flexible manner.

To subscribe to a report by implementing a message, we split it into three parts.

We use the SQL Server Agent generation job to trigger a process in a fixed cycle. Then in this process, you first implement an app to generate the report into a specified directory, and then call another program, according to the configuration file, send the report to the users of the specified mail group.

First, create the application that generates the report PDF.

The main idea to build a PDF is to add a ReportViewer control with a WinForm application and then generate the report directly into PDF format.

Open Visual Studio 2012 to create an WinForm application.

Add the ReportViewer control on the form.

Then, create a few tables in the database to hold the configuration information for the report control and the configuration information sent by the message. The structure of these three tables can be defined according to the actual situation, in this film, reportbase mainly save ReportServer and reportpath two pieces of information, used to locate a server-side report. Emailbase is primarily used to record all user names and passwords for outgoing messages and the address of the SMTP server. Reportto is used to record who the mail is sent to.

Once you have created the underlying table, go back to the project and add a LINQ to SQL Classes (you can choose Entity Data Model, of course).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.