This page
Reporting Services Overview Design First Report Deployment and Test Sets the report to the web application to embed the report to the Web application secure report safe to use the Reporting Services Web service subscription report Next what to do?
Flexible reporting features are a requirement for most business applications, which are more wide after integrating into a web application. With the latest version of SQL Server® 2000 Reporting Services, you can easily have report generation functions from various data sources. In this article, I will introduce to the use of Visual Studio® and Reporting Services to write reports and demonstrate how to integrate reports into the web application.
Reporting Services is based on the server-based report generation platform, which is built on .NET Framework and integrated with SQL Server 2000, so you can use an extension-based web-based API to integrate rich report generation power into the application . Although the report server uses SQL Server as a repository of the report, it can be used to provide data for the report using the OLE DB, ODBC, or ADO.NET provider, which makes Reporting Services become generated in a variety of enterprise environments. Extreme tools for reports.
Reporting Services is authorized as part of SQL Server 2000, so if you have an authorized SQL Server copy, you can run Reporting Services on the same server without paying additional license fees. If you decide to run the Reporting Services on a computer (for example, a web server) authorized by SQL Server (for example, web server), you will need to purchase additional SQL Server licenses.
To start using Reporting Services, you can download the 120-day trial software in SQL Server 2000 Reporting Services, which also includes instructions on how to get the installation media of the product. When installing the product, make sure that the options including the sample report are selected as I want to integrate these reports into the web application of this article.
Reporting Services Overview
Reporting Services Report Design Using New Visual Studio .NET 2003 Report Designer, the designer can be used after installing Reporting Services on the same computer installed with Visual Studio. The designer outputs a report layout and data access in a new XML report definition language (RDL), and the RDL file will be released to the report server. If you want to provide a creation function for users, you can also use third-party report designers.
Administrators can use the web-based report manager to manage published reports, and can perform some tasks, for example, to ensure safe or change the data source connection string of the deployed report for some user group reports. Users can also use the report manager to browse and view reports; but many companies tend to use the URL request or Reporting Services Web service to direct the report to the existing internal Web site or application.
Figure 1 Reporting Services Architecture
The report can be parameted so that users can choose from the selection list when viewing the report; they can also export into a variety of formats, such as Microsoft®Excel, PDF, and XML. Although the Timetop provides the latest data, it is also possible to cache a report to improve performance and reduce the load on the data source. For business intelligent applications, the report can access Analysis Services OLAP cubes, and Reporting Services can even import existing Microsoft Access reports, although there is a difference in these two technologies, it does not support all Access functions. See Figure 1 for details on the Reporting Services architecture. Back to top
Design first report
Although the focus I introduced is to integrate the report to the application rather than a creation report, the best way to familiarize with Reporting Services is to immediately create a new report item. To do this, open Visual Studio and create a new item with Report Project Wizard, which is part of the Business Intelligence Projects. Specify a name for your project, click "OK", and then the Report Wizard dialog box will be displayed. In this step of your choice of data sources, click the "Edit" button to specify the AdventureWorks2000 that is connected to your database server, click OK, and then select the option to share the shared data source.
Click "Next" to enter the "Design the Query" step, specify a simple SQL statement (for example, "select * from product") and then click "Next". Reporting Services supports a standard table format (Tabular) report that displays a set of fixed columns, also supports a matrix (MATRIX) report with a cross-table style view with a dynamic column, so select Tabular for the report, then click "Next" .
Drag some columns (eg, ProductID, and Name) to the Details section and click "Next". Select the default Bold style, click "Next", then specify the URL of the virtual directory of your report server, for example, http: // myserver / reportserver. Now click "Next". In the last step, you can specify a name for your first report, for example, Products Report; and then click Finish.
The wizard will create the project, and also create a report that can be shared by multiple reports, as well as a report on Products data in the designer (see Figure 2). By default, the display allows you to modify the Layout tab of the report.
Figure 2 Visual Studio Report Designer
The DATA tab is used to specify the query of the report, including setting parameters to prompt the user to provide a value when the report is executed. Click the "Preview" tab to test the way the report is displayed to the user.
Now you can add additional reports to the item, or add additional columns to add data to the data, add aggregate, or even add additional tables that can display data from other queries to modify the product. Unlike a lot of report designers, Reporting Services uses out-of-band design, which makes it easy to create a report that sets various source data in the same location.
The report items you have just created consists of a set of files currently residing on your development machine. In order to publish these reports to users, you need to deploy the project to the report server. Back to top
Deployment and testing
Before deploying report projects, you need to specify which server deployed to which server is deployed. If you initially use the wizard to create a report item, you may have specified the target server.
To check this setting or specify a new server, select "Project | Properties" to display the Project Properties dialog. Perform this setting allows you to specify the item's folder name and the URL of the Reporting Services Web service. Select "Build | Deploy Solution" on the menu to build a report item and deploy it to the server.
After you deploy the report, you can test it. Each report that has been deployed to the server has a unique path that can be used to display reports in the browser. For example, to display the first report you created, open your browser and navigate to http: // myserver / reportServer? / Report Project1 / Products Report. This will present a report in an HTML format and display a toolbar at the top of the page so that you can turn your report to change the scales, even in a variety of other formats (eg, PDF).
You can also browse a list of all report items deployed to the server by navigating the following URLs on the server: http: // myserver / reportserver. Report servers provide you can view the deployed report type and view the smallest user interface of the report.
Report Manager is a more friendly, more featured tool, which can access the tool by simply navigate to the following URLs on the local server: http: // myserver / reports.
Back to top
Add reports to web applications
Since you know how to design, deploy and test reports, let us integrate these reports into the app! Many web applications include custom homepage for each user, is often referred to as "dashboard." This page typically provides a summary information for user quantiles and other functions of accessing applications as a jump point.
I will build a dashboard with the sample report included with the Reporting Services to demonstrate the report integration, as shown in Figure 3. If you have installed the sample report during the installation process, you can open the report item (install to / Reporting Services / Samples / Reports) and deploy it to the test server. You can test the sample report by browsing to the Samplereports folder using the Report Manager tool.
Figure 3 Dashboard Web Application
The easiest way to provide users with access to the report from the application is to use hyperlinks. As you have seen, each report has a unique, used to display the path to the report. For dashboard applications, the report should be opened in a separate window, so I will specify a goal for the hyperlink. So far, this is very simple, but what is the situation for reports with parameter reports (for example, the Employee Sales Summary report? To truly integrate the report into the application, you usually need to specify certain values for the parameter so that users will not be prompted.
Reporting Services makes this task very simple: the value of the report parameters can be specified as part of the URL. For example, the Employee Sales Summary report has the REPORTYEAR, ReportMonth, and Empid parameters, so the hyperlink of employees who appear to be numbered in November can be:
The parameters that do not have the values specified in the URL will use the default values set in the report designer, so the ReportYear value used by the example sales summary report used is 2003. The Reporting Services also has a built-in parameter for controlling report display mode. These parameters distinguish your own report parameters by adding prefix "RS:".
One of the most useful parameters is the RS: Format parameter, which is used to specify the format of the rendering report. This allows you to include reports that need to be displayed in HTML, and can also use formats such as PDF even XML. Other common parameters are RS: Command, which indicates the operation of the path to be applied to the path you specify. For example, RS: command = render will present a report, and RS: command = listchildren will list all in the folder.
If you don't specify a command, Reporting Services will view the path you specified and calculate the appropriate operation to take, for example, rendering reports. Figure 4 shows the list of RS: parameters. Another group of built-in parameters controls behavior in various output formats and uses RC: Prefix. Each report format has its own specific set of parameters. For example, you should render a report in a comma-separated value (CSV) format without title, you should use the RC: NoHeader parameter: