You can create a Web project to display a report on the Web in minutes using the Data Dynamics Reports pre-packaged WebReportViewer control.
This walkthrough illustrates how to create a simple WebReportViewer project.
The walkthrough is split up into the following activities:
- Adding the WebReportViewer to a Visual Studio Web site
- Adding the MoviesByProducer.rdlx report to the project
- Connecting the report to the viewer
- Viewing the report
To complete the walkthrough, you must have Internet Information Services (IIS) installed and the Default Web Site running on your machine. You must also have completed the Walkthrough: Parameters.
![]() |
Caution: In order for the E-mail Report button to function, the Default SMTP Virtual Server in IIS must also be running. |
Adding the WebReportViewer to a Visual Studio Web Site
To add the WebReportViewer to your Web site
- Open an ASP.NET Web Application project in Visual Studio.
- If you haven't done so already, add the WebReportViewer to the Visual Studio toolbox.
- From the toolbox, drag the WebReportViewer control onto the design surface of the ASPX form. This automatically adds a CoreHandler.ashx file to the project. (In Visual Studio 2005, you must manually add the DataDynamics.Reports.Web reference.)
- In the properties grid, change the Dock property of the viewer to True so that it will fill the Web page and resize along with the window.
Adding the MoviesByProducer Report to the Project
To add the MoviesByProducer report to the project
- From the Visual Studio Project menu (Website menu in Visual Studio 2005), select Add Existing Item.
- Navigate to the MoviesByProducer.rdlx file you created in the Parameters walkthrough and select it.
- Click Add.
Connecting the Report to the Viewer
To connect the report to the viewer
- With the WebReportViewer selected in the properties grid, click in the ReportName property and click the ellipsis button that appears. This opens the Select URL dialog.
- In the Contents of folder pane, select MoviesByProducer.rdlx and click the OK button.
Viewing the report
To view the report at design time
- Click the Preview tab of the report designer.
To view the report at run time
- Run the project.
- Select a parameter for the report.
- Click the View Report button.
