ReportViewer Web Server and Windows Forms Controls

The ReportViewer controls are used to host reports that you create in Microsoft Visual Studio 2008. There are two versions of the control: ReportViewer Web server control for ASP.NET pages, and ReportViewer Windows Forms control that you can use with Windows Forms applications. Visual Studio determines which version to use based on the type of project you are using to embed the control. If you are embedding the ReportViewer control on an ASP.NET project, for example, you get the Web server control automatically.

ReportViewer Features

Both versions of the ReportViewer control support the following features:

  • View areas used to display a report, a toolbar, and a document map. The toolbar is configurable and provides run-time features to support navigation in a multipage report, zoom, search, print, and export functionality. A document map appears if you explicitly add one to your report.

  • Properties that allow you to configure the processing mode, view areas, and toolbar.

  • Support for local and remote processing modes so that you can control where and how reports are processed. Local processing mode retrieves a client report definition which is processed by the control within your application. Remote processing mode retrieves a fully processed report that was previously published on a Microsoft SQL Server 2005 Reporting Services report server.

  • Programmatic interfaces so that you can customize, configure, and interact with the control through code, including changing the data sources used by the ReportViewer at run time.

Functionality Differences Between the Web Server and Windows Forms Controls

The type of control that you use determines the default presentation format for a report as well as the visual characteristics of the toolbar. Additional differences do exist in report processing and deployment strategies. The following table describes the differences between the ReportViewer Web server and Windows Forms controls:

Default presentation format

The Web server control uses HTML formatting to display a report, while the Windows Form control uses Graphical Device Interface (GDI) to provide a visual experience that is consistent with Windows user interface styles.

Both versions of the control support additional export options so that you can view the report as a PDF or Excel file.

Processing

Local report processing is always performed as a background process in the Windows Forms control. For the Web server control, local report processing can be configured for asynchronous processing.

Printing

Printing reports from the Windows Forms control uses the print functionality of the operating system. Printing reports from the Web server control uses an ActiveX print control if the report is processed on a remote server. If you want to print a locally processed report from the Web server control, you can export the report to another output format before you print.

Deployment

The deployment strategy for reports hosted in the Web server control in an ASP.NET application must take session state and Web farm configuration into account. If you are using the Web server control to process a report on a remote report server, you must consider how to authenticate application users to access the server and any external data sources that provide data to reports.

Browser requirements

The Web server control has browser requirements. To use all of the reporting features that are available in the Web server control, you should use Microsoft Internet Explorer 6.0 with scripting enabled. You can use other browsers, but you might encounter functional limitations in report functionality. For more information, see Browser Support for ReportViewer Web Server Controls.

In addition to understanding the differences between the controls, it is even more important to understand the effect of processing mode. The type of processing mode that you use determines how the control is used and how reports are created, processed, and deployed. Local processing on the client is ideal for applications that have a relatively small set of predefined reports and a data source that is local to the application. Remote processing on a report server is recommended if you require more processing capability than a local control can provide. Remote processing requires access to a licensed copy of SQL Server 2005. For more information about processing modes, see Configuring ReportViewer for Remote Processing and Configuring ReportViewer for Local Processing.

See Also

Tasks

Walkthrough: Using a Database Data Source with the ReportViewer Web Server Control in Local Processing Mode

Concepts

Deploying Reports and ReportViewer Controls
Configuring ReportViewer for Asynchronous Rendering
Printing Reports from ReportViewer
Optimizing Report Layout for HTML Output (Visual Studio Report Designer)
Report Overview (Visual Studio)
Adding and Configuring the ReportViewer Controls
Configuring and Using the ReportViewer Toolbar