Sie sind auf Seite 1von 45

Demo Script

SQL Server 2008 R2 Reporting Services Demo


Lab version: Last updated: 1.0.0 3/29/2012

CONTENTS OVERVIEW ................................................................................................................................................... 3 Key Messages ........................................................................................................................................... 3 Demo Diagram .......................................................................................................................................... 3 Key Technologies ...................................................................................................................................... 4 Time Estimates ......................................................................................................................................... 4 SETUP AND CONFIGURATION .................................................................................................................. 4

Task 1 Running the Configuration Wizard ......................................................................................... 5 Task 2 Configuring the Report Server ................................................................................................ 7 Task 3 Deploying the AdventureWorks Sample Reports ................................................................. 15 Task 4 Browsing the Reports in the Report Manager ...................................................................... 20
DEMO FLOW .............................................................................................................................................. 22 OPENING STATEMENT............................................................................................................................. 23 STEP-BY-STEP WALKTHROUGH ............................................................................................................ 24 Segment #1 Creating a Report in Report Builder 3.0 .......................................................................... 24 Segment #2 Consuming Reports from a Web application ................................................................... 36 SUMMARY .................................................................................................................................................. 44

Overview
This document provides setup documentation, step-by-step instructions, and a written script for showing the SQL Server 2008 R2 Reporting Services demo application functionality and code. This document can also serve as a tutorial or walkthrough of the technologies being exposed. This demo aims to show the reporting capabilities of SQL Server 2008 integrated with a rich web application. It relies on SQL Server Reporting Services to generate and host custom reports and consume the management services needed to integrate them in your own applications. Key Messages 1. You will learn how to open, create and deploy SQL Server Reporting Services reports using Report Builder 3.0. 2. You will learn how to consume embedded SQL Server Reporting Services reports using URL Access. 3. You will learn how to manage SQL Server Reporting Services reports consuming Reporting Services SOAP API. Demo Diagram

Figure 1 Demo diagram

Key Technologies This demo uses the following technologies: 1. Microsoft SQL Server 2008 R2 Reporting Services 2. Microsoft Report Builder 3.0 3. AJAX Time Estimates Estimated time for setting up and configuring the demo: 15 min Estimated time to complete the demo: 40 min

Setup and Configuration


System Requirements
Microsoft SQL Server Express 2008 R2, with the following features installed: Database Engine Reporting Services in Native Mode Microsoft SQL Server Management Studio

Microsoft SQL Server Business Intelligence Development Studio

SQL Server AdventureWorks2008R2 Sample Database Microsoft SQL Server 2008 R2 Reporting Services Samples (make sure to download the MSI installer or the ZIP version of the release for Microsoft SQL Server 2008 R2) Microsoft SQL Server 2008 R2 Report Builder 3.0 Microsoft Visual Web Developer 2008 Express SP1 or Microsoft Visual Studio 2008 SP1 Any PDF Reader

The setup and configuration for this demo involves the following tasks: Task 1 Running Configuration Wizard Task 2 Configuring Report Server Task 3 Configuring Basic Authentication in Reporting Services Task 4 Deploying AdventureWorks Sample Reports Task 5 Browsing the Reports

Note: This demo is designed for the Express Edition of SQL Server 2008 R2, with an instance name of .\SQLEXPRESS. If this is not the case, some walkthrough steps might require further actions and URLs and code might need modifications. Please adjust the instructions to match your environment where necessary.

Task 1 Running the Configuration Wizard The following steps describe how to run the Configuration Wizard tool included with the demo to verify that all the prerequisites are properly installed.

1. Browse to the setup folder in the Source folder of this demo, and run the Setup.cmd script. This script will launch the Configuration Wizard for the demo. The Configuration Wizard is designed to check your computer to ensure that it is properly configured with all of the dependencies needed to run the demo. 2. Click through the steps in the Configuration Wizard to get to the Detecting Required Software step, a scan of prerequisites will be performed on your computer. If you do not have the necessary dependencies, install them using the links provided by the tool and rescan your computer.

Figure 2 Dependencies check completed successfully

3. Once the required software is properly installed click Next to configure your computer for this demo. A script will be executed to deploy a custom style sheets into the reports server (you will be prompted to enter the Report Server instance name) and another to create the server alias ('SQLServerTrainingKitAlias') used in this demo to establish a connection with the database.

Figure 3 Configuration Wizard tasks

Task 2 Configuring the Report Server 1. Open Reporting Services Configuration Manager from Start | All Programs | Microsoft SQL Server 2008 R2 | Configuration Tools. Note: The Reporting Services Configuration tool is used to configure a Reporting Services installation. You can configure a local or remote report server instance as long as you are a member of the local administrator group on the report server computer.

2. In the Connect to a report server instance dialog box, make sure that your local report server instance (for example MSSQLSERVER) is selected and click Connect.

Figure 4 Reporting Services Configuration Manager connection

3. On the Web Service URL ( ) page, make sure that the Virtual Directory is set to ReportServer_%YourSqlServerInstanceName% (for example ReportServer for the SQL Server default instance) and that the TCP Port is set to 80. Note: The virtual directory name identifies which application receives the request. Because an IP address and port can be shared by multiple applications, the virtual directory name specifies which application receives the request.

Figure 5 Web Service Configuration

4. On the Database page(

), make sure that:

a. SQL Server Name points to your local SQL Server instance (for example localhost\.). b. Report Server Mode is set to Native.

Figure 6 Database Configuration

5. If the Database Configuration values are not set as above, follow these steps: a. Click Change Database to open the Report Server Database Configuration Wizard. b. Click Create a new report server database and then Next. c. In the Database Server page, set the Server Name to point the local SQL Server instance (for example SQLExpress) and select Current User -Integrated Security for the Authentication Type.

Figure 7 Change Database Server Configuration

d. Click Next. e. In the Database page, type ReportServer as the Database Name and click Native Mode for the Report Server Mode.

Figure 8 Change Database Configuration

f.

Click Next to continue.

g. In the Credentials page, select Service Credentials for the Authentication Type.

Figure 9 Change Database Configuration

h. Click Next, and finally Finish to complete the wizard.

6. On the Report Manager URL page ( ), make sure that the Virtual Directory is set to ReportServer_%YourSqlServerInstanceName% (for example ReportServer for the SQL Server default instance). Note: Use the Report Manager URL page to configure or modify the URL used to access Report Manager. By default, the Report Manager URL inherits the prefix, IP address, and port of the Report Server Web service URL. This is because Report Manager provides front-end access to the Web service that runs within the same Report Server service.

Figure 10 Database Configuration

Note: If you see a warning message saying: The Report Manager virtual directory is not configured, click Apply to create it and configure it.

7. Click Exit to close the Configuration Manager. Task 3 Deploying the AdventureWorks Sample Reports 1. Open Business Intelligence Development Studio from Start | All Programs | Microsoft SQL Server 2008 R2 with administrative privileges. 2. Click the File menu, point to Open and then click Project/Solution. 3. Browse to %ProgramFiles%\Microsoft SQL Server\100\Samples\Reporting Services\Report Samples\AdventureWorks 2008R2 Sample Reports, select the file AdventureWorks 2008 Sample Reports.sln and click Open. Note: If you are using the ZIP version of the Reporting Services Samples, browse to Samples\Reporting Services\Report Samples\AdventureWorks 2008R2 Sample Reports in the folder where you extracted the files instead of the folder specified above.

Figure 11

AdventureWorks2008 Sample Reports in Business intelligence Development Studio

4. On the Visual Studio toolbar, select Release in the Solution Configurations (the default configuration is Debug).

Figure 12 Release Configuration

5. Right-click the AdventureWorks 2008R2 project and select Properties. 6. On the General tab, configure the General properties as follows: a. Set OverwriteDataSources to True b. Set TargetReportFolder to AW2008SampleReports c. Set TargetServerURL to http://<servername>/reportserver

Figure 13 Project Configuration

7. Click OK. 8. In Solution Explorer, under the Shared Data Sources folder, double-click AdventureWorks2008R2.rds to open the Adventure Works Data Source Properties. 9. Under the General page, modify the Connection String to use the SqlServerTrainingKitAlias server alias. Connection String

Data Source=SqlServerTrainingKitAlias; Initial Catalog=AdventureWorks2008R2

Figure 14 Data Source Configuration

10. Click OK. 11. On the Build menu, click Deploy AdventureWorks 2008R2.

Note: When you deploy the solution, the reports are published to the report server.

Task 4 Browsing the Reports in the Report Manager 1. Open Internet Explorer with administrator privileges. Note: It is important to run the Web browser as administrator otherwise, you will not be able to browse the reports.

2. Browse the Report Manager at http://localhost/reports. 3. In the Home page, click the AW2008SampleReports folder. You should see all AdventureWorks2008 Sample Reports. Note: Report Manager is a Web-based tool that includes features for viewing and managing reports. It is part of a report server installation. To open Report Manager, type the Report Manager URL in a browser window. You can use any supported Web browser to view a report through a direct connection to a report server. Every report has a URL address on a report server. You can use that address to open it in a new browser window independently.

Figure 15 AdventureWorks2008 Sample Reports in Report Manager

Demo Flow
The following diagram illustrates the high-level flow for this demo and the steps involved:

Figure 16 Demo flow

Opening Statement
Today I would like to walk you through a demo application built to show SQL Server 2008 Reporting Services integrated within a rich Web application. Reporting Services provides a full range of ready-to-use tools and services to help you create, deploy and manage reports for your organization, as well as comprehensive set of APIs that enable you to extend and customize your reporting functionality. There are two options for integrating Reporting Services into custom applications: URL access and the Reporting Services Web service, also known as the Reporting Services SOAP API. During the demo, I will show you how to use both methods from a rich web ASP.NET application. We will start creating a new report from scratch and deploying it to SQL Server using the Report Builder 3.0 tool. Microsoft SQL Server 2008 R2 Report Builder 3.0 provides an intuitive report-authoring environment for business and power users and supports the full capabilities of SQL Server 2008 R2 Reporting Services. After that, I will show you how SQL Server 2008 R2 Reporting Services reports can be consumed and embedded into your Web applications. In particular, we are going to access the report server through URL requests, which in turn will be processed depending on specific parameters, parameter prefixes, and types of items that are included in the URL. Direct URL access provides report navigation functionality in a Web browser or supported HTML viewer. It is the fastest, most efficient way to render reports. On the other hand, Web services provide additional functionality for managing the contents of a report server through an extensive set of Web methods that are not available through URL access. Reporting Services SOAP API is intended for scenarios in which the management of reports, subscriptions, data sources, and other report server database items is a requirement. I will show how you can use ASP.NET to consume SQL Server Reporting Services Web services to list existing reports and delete them as needed. Is important to notice that SQL Server 2008 R2 Reporting Services is included in SQL Server 2008 R2 Express, which is available for free downloading as well as Report Builder 3.0. In this demo, you will specifically learn these things: 1. How to open, create and deploy SQL Server Reporting Services reports using Report Builder 3.0. 2. How to consume embedded SQL Server Reporting Services reports using URL Access. 3. How to manage SQL Server Reporting Services reports consuming Reporting Services SOAP API.

Step-by-Step Walkthrough
This demo is composed of the following segments: 1. Creating a Report in Report Builder 3.0 2. Consuming Reports from a Web application Segment #1 Creating a Report in Report Builder 3.0
Action Script Screenshot

1. Open Report Builder 3.0 from Start | All Programs | Microsoft SQL Server 2008 R2 Report Builder 3.0 with administrator privileges. 2. Open the TopStoresBegin.rdl report located under the Assets folder in the Source folder of this demo. When prompted, type the Report Server URL (e.g. http://<servername>/reportserver.

This demo uses Report Builder 3.0 to create a report that will show the top 5 selling stores in a table and in pie chart. Report Builder 3.0 is an intuitive, Office-optimized report authoring environment for business users who prefer to work in the familiar Microsoft Office environment. You can use Report Builder 3.0 to work with data, define a layout, preview a report, and then publish it to a report server. We have opened an existent report that has some basic settings already defined such as the report title, its look & feel, and some variables. We will expose how to specify additional parameters for the report later on.

3. In the Insert tab, click Table ( ) and select Table Wizard to open the New Table or Matrix wizard. 4. Select Create a dataset and click Next. 5. Choose AdventureWorks2008R2 Data Source Connection and click Next.

We will use the Create Table Wizard to create a report that ranks the top 5 stores. A report dataset consists of a result set from a relational database, which can result from running database commands, stored procedures, or user-defined functions. We will create a new dataset using the existing AdventureWorks2008R2 Connection Data Source.

6. In the Design a Query page, click Import ( ). 7. Modify the filter to show All items (*.*). Select the TopStoresQuery.sql file located under the Assets folder in the Source folder of this demo and click Open.

This is the Query Designer. Here we are going to design a query using our data source. You can browse and select database fields and tables For demo purposes, we are actually going to import an existing query that retrieves the top 5 stores.

8. If you wish to execute the query you can optionally click Run ( ). In the Define Query Parameters specify the

(Optionally) We can click Run to execute the query and retrieve the data that will be used to fill the report. In order to do that, we first need to

following parameters values: @ProductCategory: 1 @ProductSubCategory: 2 @StartDate: 1/1/2001 @EndDate: 1/9/2008

provide the query parameters.

9. Click Next to continue. 10. In the Arrange Fields page, drag the Store field to the Row Groups section and the SaleAmount field to the Values section. 11. Click Next to continue.

Now we have to arrange the fields to specify how they are going to be displayed in the report. We want to show the sales amount for each store. Therefore, we group them by the Store field and we set the Value to be displayed as SaleAmount field. By default, SaleAmount is summarized with the Sum function as we wanted, but you can change it to any other function. (Perform Action: Show the list of available functions).

12. In the Choose Layout page, uncheck the Show subtotals and grand totals option. 13. Click Next to continue. 14. In the Choose a Style page, leave the default style selected and click Finish.

We remove the totals from the table layout and select the default style.

15. Point to the table handle icon ( ) and drag the table to a suitable position on the page. Use the blue lines as guide while moving the table. 16. Click inside the table surface. Row and column handles appear on the outside of the table and brackets appear inside cells. 17. Enlarge the column widths using the column handles.

We can see that the table is now displayed in the report designer. Notice that we can customize the position of the table in the report and the width of its columns.

18. In the Report Data pane (on the left), right-click the ProductCategories dataset ( ) and select Query ( ). 19. Show the query displayed in the Query Designer text box. 20. Click Run ( ) to execute the query and display the result set. 21. Click OK to close the Query Designer.

The starting solution has a set of queries already defined. These queries will be used to retrieve the report values of the report parameters drop-down boxes (for example, ProductCategory and StartDate). When the user browses the report, he will select one value for each parameter to fill the report with the data.

22. In the Report Data pane, under the Parameters folder, right click the ProductSubcategory parameter ( ) and click Parameter Properties. 23. In the Report Parameter Properties dialog box, select the Available Values tab and click Get Values From a Query. 24. Specify ProductSubcategories as Dataset, ProductSubcategoryID for the Value Field, and Name for the Label Field. Do not close the designer yet.

Now we will define the data source used to retrieve parameter values. We have already configured the ProductCategory parameter, but not the ProductSubCategory in order to show you how this is done. We use the ProductSubcategories dataset to retrieve the available subcategories that will appear in the report using its ID as the value and displaying its Name as the Label field.

25. On the Default Values tab, click Specify Value. 26. Click Add and specify 2 in the Value field. 27. Click OK.

We will now choose a default value for the ProductSubCategory parameter.

28. Click Run (or press F5) to preview the report. 29. Point to the report toolbar and show the parameters. 30. Unfold the combo boxes to show the values retrieved by the queries and click the calendars to show date parameters.

We can now run our report to see how it looks like directly from Report Builder. This will actually execute the queries and retrieve data from the database. We can modify the parameter values to filter the report for a different category, a different date range, etc. Right now, we can see the table with the 5 top most selling stores. However, the sales amounts do not look nice in the table. Besides, we would like to be able to sort stores by name or amount of sales dynamically.

31. Click Design (or press F8) to go back to the design view. 32. Click over the SalesAmount field surface to select it. Click the Currency icon ( ) in the toolbar to change its format.

Let us modify the Sales Amount column so that its values are displayed as currency.

33. Right-click the Store column header and select Text Box Properties. 34. Select the Interactive Sorting page and select Enable interactive sorting on this text box. Specify Store for the Groups and [Store] for the Sort By. 35. Do the same for the Sales Amount text box header, and specify [SaleAmount] in the Sort By option.

Now, we will configure the headers to enable interactive sorting. Notice that we can choose the sorting fields and we can even specify special sorting functions to use.

36. Press F5 to preview the report. 37. Use the sorting buttons ( , ) to show the results sorted in different ways.

Let us run the report again. Notice the sales amounts with the currency ($) symbol. We can use the sorting buttons to sort columns as desired.

38. Click Design (or press F8) to go back to the design view. 39. In the Insert tab, click Chart ( ) and select Chart Wizard to open the New Chart wizard. 40. Select DataSet1 from Choose an existing dataset in this report and click Next.

Let us use charts to make the information more consumable. For our report, we will add a pie chart showing the sales percentages for each store. We use the Chart Wizard to create our pie chart using the same dataset used for the report table. The DataSet1 is the dataset we created at the beginning of this demo. Remember that this dataset retrieves the top 5 most selling stores.

41. In the Choose a Chart Type page, select Pie and click Next to continue.

The Report Builder provides different kinds of charts we can integrate into our reports.

42. In the Arrange Chart Fields page, drag the Store field to Categories and the SaleAmount field to Values. 43. Click Next to continue.

Now we have to arrange the fields to specify how they are going to be displayed in the pie chart. We want to show the sales percentages of each store, so we use the Store field as Category and we drag the SaleAmount field to Values.

44. Select Generic style and click Finish

Now we select the look & feel of the report.

45. Point to the chart handle icon ( ) and drag the chart to the right side of the table. Use the blue lines to serve you as guide while moving the table. 46. Then expand the chart size.

We can see that the chart is now available in the designer. Now let's move it next to the table and make it bigger.

47. Right-click the chart and select Show Data Labels. 48. Right-click any of the labels and select Series Label Properties ( 49. In the General tab, select #PERCENT for the Label data. 50. Click OK. 51. Delete the chart title.

Let us display the labels as percentages and remove the default title.

).

52. Press F5 to preview the report.

Let us run the report again to see the customizations we have made to the chart.

53. Click the Report Builder Button ( ) and select Save As. 54. Click Recent Sites and Servers. Double-click your local report server instance and then click AW2008SampleReports. 55. In Name specify TopStores.rdl. 56. Click Save.

Now that we the report is ready, we will save it and upload it to the report server.

57. If not already opened, open a Web browser with Administrator privileges. Browse to http://localhost/Reports_SQLEXPRE SS/. If you are not using SQLEXPRESS, type the correct location of the Report Server. 58. Select the AW2008SampleReports folder. 59. Select the TopStores report.

Now we can browse the Report Manager and see the report we have created by using Report Builder. Report Manager is a Web-based tool that includes features for viewing and managing reports. To open Report Manager, type the Report Manager URL in a browser window.

60. Navigate back to the AW2008SampleReports folder in the Report Manager. 61. Click the down arrow ( ) of the TopStores report and select Manage. 62. Type "Adventure Works top five sales stores" in the Description field. 63. Click Apply. 64. Go back to the AW2008SampleReports page by using the Report Manager navigation bar and verify the description is displayed with the report.

Let's add a description to this report in the report server using the Report Manager Properties Page.

Segment #2 Consuming Reports from a Web application


Action Script Screenshot

1. Open Microsoft Visual Studio 2008 from Start | All Programs | Microsoft Visual Studio 2008. 2. Open the ReportingServicesDemo.sln demo solution located under the under the code folder in the Source folder of this demo. Then select the ReportServer web reference, press F4 to open the Properties pane and modify the Web Reference URL property to point to http://<servername>/reportserver/r eportservice2005.asmx. 3. Right-click the ReportServer web reference and select Update Web Reference. 4. Open the ReportRepository.cs file located under the ReportingServicesDemo.Data project and modify the serviceUrl and serverUrl static string fields to point to the right Report Server URL. 5. Set the ReportingServicesDemo.Web project as startup project and press F5 to run the solution and display the application home page.

Now, in this second part, I will show you how to consume the Report Server Web service from a rich Web application. The Report Server Web service consists of methods and a set of complex type objects that you can use to access the complete functionality of Reporting Services from any Web application. When first opened, the home page displays a dashboard with all the reports deployed in the report server.

6. Go back to Visual Studio and using Solution Explorer, open ReportRepository.cs. 7. Show the GetReports method.

Let us see how to use the Report Server Web service to retrieve the list of reports. The Report Server Web service uses SOAP over HTTP and acts as a communications interface between client programs and the report server. Let us open the ReportRepository class where we are creating an instance of the ReportingService2005 class in order to connect with the Report Server Web Service. The ReportingService2005 class contains the methods and properties that can be used to call the Microsoft SQL Server 2005 Reporting Services (SSRS) Web service. Notice that we have added a Web reference to the project to create proxy class and be able to communicate with the Report Server Web service. The service description of the Report Server Web service can be obtained at http://<servername>/reportserver/r eportservice2005.asmx?wsdl.

8. Show the call to the ListChildren method.

Now, having an instance of the Soap Client we can make calls to any methods of the SOAP API. To retrieve a list of all items from the report server database we use the ListChildren method. ListChildren method has the following parameters: Item: The full path of the parent folder. In this case we are retrieving all the items under the root folder. Recursive: A Boolean expression that indicates whether to return the entire tree of child items below the specified item.

The repository uses the ListChildren method to read the contents of the report server root directory to then filter the Report type items.

9. Go back to the Web browser. In the SSRS Demo home page click the VIEW REPORT link located in the "Employee Sales Summary 2008" panel, in order to show the report using the URL Access approach.

The report server is accessible through URL requests. URL requests contain parameters that are processed by the report server. The way in which the report server handles URL requests depends on the parameters, parameter prefixes, and types of items that are included in the URL.

10. Point to the parameters section of the report toolbar, click the Report Month drop-down list and select January. 11. On the Report Year text box, type 2008. 12. Click View Report in order to update the report with the selected filters.

We can see the report toolbar at the top of the page. The report toolbar provides page navigation, zoom, refresh, search, export, and print functionality for reports that are rendered in the HTML rendering extension. On the toolbar, let us examine the parameter section. We can modify the filters for the report. For example, we can change the report month, the report year, etc.

13. Click the SO61182 link located at January 2008 Order Summary table.

Additionally, we will find some links in the report that allow you to navigate between reports easily. Let us see the details for the SO61182 order.

14. Browse back to the SSRS Demo home page and click the VIEW REPORT link located in the "Product Catalog 2008" panel. 15. On to the report toolbar, type 4 on the Page navigation control and press ENTER.

From the report toolbar, we can use the page navigation controls to perform several actions. For example, we can open the first or last page of a report, examine a report page by page, and open a report's specific page. I will show you how to open a specific page in a report.

16. Click the Export button ( ) and select PDF format from the dropdown list. 17. Click the Export link and then click Open to show the report in the selected format.

We can choose to view the reports in a variety of formats. The available formats are determined by the rendering extensions that are installed on the report server. Let us see how to export the report to PDF format.

18. Browse back to the reports dashboard. 19. Click the VIEW REPORT link located in the "Product Line Sales 2008" panel. 20. Modify the year of the End Date parameter to 2008.

Now, let us see how to use URL Access with parameters. First, we can explore the "Product Line Sales 2008" report (for example toolbar, parameters section, etc).

21. Show the report using the URL Access approach. To do this, browse back to the SSRS Demo home page and click the VIEW REPORT WITHOUT FILTERS link located in the "Product Line Sales 2008" panel.

Notice that we can use URL parameters to configure the look and feel of the reports. In this sample we are using the following parameters: rs:Command=Render: Renders the specified report. rc:Toolbar=False: Hides the toolbar. rs:Format=HTML4.0: Specifies the format in which to render a report. rc:Stylesheet=ssrsreport: Specifies a custom style sheet to be applied to the HTML Viewer. ProductCategory=2 (Components), ProductSubcategory=11 (Headsets), StartDate=1/1/2003 and EndDate=12/31/2008: Hardcoded parameters used as report

filters.

22. On the Top Stores section chart, click the red area (Vigorous Exercise Company). If necessary, scroll up in the destination page to see the data.

The report charts include links allowing you to navigate between reports. For example, let us go to see the store contact info for the Vigorous Exercise Company.

23. Go back to Visual Studio and using Solution Explorer, open the view.aspx file located under the Reports folder. 24. Show how the src attribute of the IFrame is being set.

A report URL can target a report server through the address bar of the Web browser. Additionally, a report URL can be the source of an IFrame that is part of a larger Web application or portal. In order to embed the report in the web page, we first need to read the report URL from query string. Then we should use it to set the src attribute of the IFrame.

25. Open the Web browser again and browse back to the reports dashboard. 26. On the TopStores report box, click the button.

Let us see how to perform report management tasks. For example, let us try to delete a report. Notice that the TopStores report is no longer displayed

27. Click OK in the confirmation dialog box to complete the operation.

28. Using Solution Explorer, open ReportRepository.cs. 29. Show the DeleteReport method.

Now let us examine how the deletion is being performed. The repository uses the DeleteItem method (from Report Server Web service) to delete a Report type item using the report path as a parameter. The DeleteItem method not only deletes the specified item from the report server database, but also deletes additional items, such as the subscriptions, schedules, and snapshots that are associated with the item.

Summary

In this demo, you learnt how you could take advantage of reporting capabilities of SQL Server 2008 integrated within a rich Web application. Additionally, you learnt how to create reports on Report Builder 3.0 and how to consume Reporting Services custom reports from an ASP.NET Web application. You have also learnt how to manage reports through the Reporting Services SOAP API.

Das könnte Ihnen auch gefallen