Figure 2 shows the next wizard screen, Design the Table, which lets you put the query fields where you want them in the report. Click Details to move the field names from the Available fields list box to the Details list box. These selections cause the fields to appear in a report's Details section. You can optionally create additional groupings around the Details section by adding fields to the Group list box. Clicking Next opens the Choose the Table Style screen. You can accept the default selection of Bold or highlight one of the other report styles. A preview window gives you a feel for how the different styles present your data.

When you're running the Report Wizard for the first time in a project, the Choose the Deployment Location screen appears next. The wizard automatically populates the Report Server and Deployment folder text boxes. Because the Report Server for this article's examples runs from the local IIS Web server, the Report Server text box shows the path http://localhost/ReportServer. During installation, you specify the name of the Web server that hosts Reporting Services. By default, the wizard names the deployment folder after the project's name—in this case, SSMRSIntro.

The final wizard screen assigns a default name to the report and shows a summary of the selections from the previous screens. The initial default report name in a project is Report1. When you're creating your own reports, you can change the default name to something more meaningful.

After you close the wizard, you're in the Visual Studio .NET report-design environment. Each report has three tabs: one to specify its data source, another for its layout, and a third to preview how it displays data. Figure 3 shows part of the Preview tab for Report1, which shows how the report will look after you deploy it. Report1 is for one specific data source, but Reporting Services lets you use parameters to vary the output in a report. For information about how to use parameters in Reporting Services, see Rodney Landrum's article "Pushing the Parameters," August 2004, InstantDoc ID 43139.

Creating a Drilldown Report
For your second report, let's use a shared data source instead of an embedded one, as you did to create Report1. A shared data source is useful because you can reuse it in multiple reports. Start by right-clicking Shared Data Sources in the Solution Explorer, which you see in Figure 3's right pane, then choosing Add New Data Source to open a Data Link Properties dialog box like the one that Figure 1 shows. Complete the dialog box to specify Northwind as the data source, as you did for Report1. This process adds a new entry with the name Northwind.rds nested below Shared Data Sources in the Solution Explorer.

Open the Report Wizard by right-clicking Reports in the Solution Explorer and choosing Add New Report. In the Select the Data Source screen, the wizard automatically selects Northwind as the database, referring to the Northwind.rds shared data source. If you had more than one shared data source, you could open the Shared Data Source drop-down box and select another shared data source.

For the second report, enter the same query that you used for Report1 and select a tabular report style. In the Design the Table screen, add Country to the Group list box, and add CompanyName, ContactName, and Phone to the Details list box. Because you selected an item for the Group list box, a new screen called Choose the Table Layout appears before the Choose the Table Style screen. The table layout screen includes a check box called Enable drilldown. (You must select the Stepped button to make the Enable drilldown check box available.) Select Enable drilldown so that CompanyName, ContactName, and Phone column values will appear only after a user drills down to them by expanding a Country column value. Click Finish, and accept Report2 as the second report's name.

Figure 4 shows how Report2 looks in the Preview tab. Clicking the expand icon (+) next to a country name drills down to the fields nested within the group value and changes the + to a -. Notice that in Figure 4, you can view the CompanyName, ContactName, and Phone column value for the customers in Mexico, but not for either of the other two countries. Clicking the expanders for either of the other two countries will expose their hidden nested column values.

Deploying a Solution
In Reporting Services, deploying a solution is the process of publishing the reports, shared data sources, and related file items from a Visual Studio .NET project to a folder on a Report Server. Administrators can set permissions to restrict user access to reports and other solution items (e.g., shared data sources) on a Report Server.

When you right-click a project in the Solution Explorer and invoke the Build, Deploy Solution command from a Visual Studio .NET project, you publish items from a solution to a folder on a Report Server. The first time you run the Report Wizard, the folder's name and the Report Server URL appear on the Choose the Deployment Location screen. If the folder's name doesn't exist on a Report Server when a report author invokes the Build, Deploy Solution command, Report Server creates a new folder.

You can view and update the deployment folder and Report Server URL settings from a project's Property Pages. Right-click the project name in the Solution Explorer pane and choose Properties to open a project's Property Pages dialog box. The TargetFolder setting corresponds to the deployment folder for a project, and the TargetServerURL setting contains the URL for the Report Server that hosts a solution's target folder. Figure 5 shows the Property Pages dialog box for the SSMRSIntro example project. Alternatively, you can change a report's deployment location by using the Reporting Services Report Manager application after you publish the report.

Prev. page     1 [2] 3     next page



You must log on before posting a comment.

If you don't have a username & password, please register now.

 
 

ADS BY GOOGLE