This section briefly introduces how to use reporting service to create reports.

Source: Internet
Author: User
1) after the reporting service is installed, open Visual Studio. NET, select new project, choose create Business Intelligence Project, select create a report project, name it reportservice1, and then select OK, for example:


2) then, in Solution Explorer, right-click the shared data source, select "Add new data source", select the location of the SQL Server server, and select use the northwind database, press OK to create a new shared data source, northwind. RDS (you can change the name of the data source). The purpose of creating a shared data source is to reference the data connection easily in future report design.

3) In Solution Explorer, right-click report, point to add, and click Add new item ". In add new item, click report ". In the "name" box, type "report1.rdl" and click "open ". A view contains the "data", "layout", and "preview" tabs. As shown in:


4) to connect a report to a database, you must create a new dataset. In the "dataset" drop-down list box at the top, click the drop-down list box and select "new dataset". The "dataset" dialog box is displayed. Because we have already created a shared data source, therefore, in the pop-up window, we can see that the existing data source northwind can also rename the dataset. Here we keep the dataset name dataset1 unchanged, you can select whether the command type to be queried is text or stored procedure. You can enter an SQL statement or stored procedure in the query string below. Here we do not make a choice, simply press OK, for example:


5) in the data design window that appears, you can directly enter the SQL query statement: Select * from orders, and then press! To run the SQL statement. You can immediately see the query results, and then press save to save the dataset.


6) switch to the Layout View. Here, we can see that there are tool option panel and field choice panel on the left side. In the tool panel, there are various tools used to prepare reports, such as picturesque lines, images, and text box objects. In the field panel, fields under the current dataset are listed. In the layout area in the middle, we can see that the rectangular area in the middle is the place where the report is drawn. In this example, we only need to edit several fields in the field area, such as orderid, customerid, orderdate: drag to the second line of the rectangular box in the design area (the first line is the header and the third line is the end of the table) and change the header to appropriate text, such:


7) Now, we have completed a simple report design. You can click preview report. Note: If you select SQL Server login verification, you must first select a shared data source, and then enter the user name and password for logging on to SQL server in the creden. Click the preview button to view the report effect, for example:


8) Next, we will deploy our reports. Click the properties page of the Project reportservice and enter the server of the report to be deployed in the targerserverurl of the Configuration Manager that appears. Enter http: // localhost/reportserver here, because in the Reporting Service, by default, the Report Server is installed in the reportserver virtual directory. Right-click the reportsevice project and choose "deploy". The system will automatically deploy the report service.


9) Finally, open IE and enter http: // localhost/reportserver to view the reports deployed on the Report Server. Note that you can export the report to PDF, Excel, txt, and other files in the export format drop-down table. You can try it.


The emergence of Reporting Service undoubtedly gives developers an additional choice when creating reports. There are still many skills and related knowledge. This article is just a reference, for more information, see the online series of reporting services.

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.