Configuring ReportViewer for Local Processing

You can configure a ReportViewer control to process reports locally so that they use the built-in processing provided by the control. When you configure the ReportViewer control for local processing, all report processing is performed on the computer that hosts the application. All data used by the report must be retrieved from data that the client application provides.

Data sources that are used in your reports must be defined in advance, during report design. At run time, your application must generate the data table or retrieve the data that is used in the report. Locally processed reports can get data from data tables and Business objects. The steps for configuring a data source for a locally processed report vary depending on whether you are using the Web server control or the Windows Forms control. For more information about supported data sources, see Creating Data Sources for a Report.

How to Configure ReportViewer for Local Processing

To configure a ReportViewer control for local processing, you select or create a client report definition (.rdlc) file to use with the ReportViewer control:

  1. Add the ReportViewer control from the Data section of the Toolbox to the form or Web page in your project.

  2. In the ReportViewer Tasks smart tags panel, click Design a new report to create the .rdlc file you want to use. Or, you can select Choose Report to use an existing .rdlc file that is already part of your project. You can only choose one report. If the report includes subreports or drillthrough links, additional reports will appear in the file list.

    Clicking Design a new report adds an empty .rdlc file to your project, opens a blank report in graphical design mode, and provides menus and design surfaces so that you can create a new report. To create a report, you must have already defined the datasets you want to work with. For more information about creating .rdlc files, see Creating Client Report Definition (.rdlc) Files.

  3. Build or deploy the application to verify that the report appears correctly in your application.

You can use the walkthroughs to learn how to configure and use ReportViewer controls in local processing mode. All of the walkthroughs include control configurations that process reports locally. For more information, see Samples and Walkthroughs.

You can modify a report and change the processing options so that the report processes on a remote Microsoft SQL Server 2005 Reporting Services report server. For more information, see Converting RDL and RDLC Files.

Important

In contrast to the WinForms version of the ReportViewer control, the WebForm version does not support changing the report definition after it has been rendered. To change the report definition, you will need to create a new instance of the ReportViewer control.

When to Use Local Processing

Local processing mode is recommended for applications that include small to medium-sized reports and datasets. Because all data and report processing is performed on the client, you might encounter performance degradation if you attempt to process large or complex reports and queries. Local processing mode is also recommended if you require a straightforward deployment strategy where all parts of the application run together on the same computer.

Local processing mode is less powerful than remote processing and is intended for standalone applications that do not require a report server. Users who are familiar with server reports that run on a remote SQL Server Reporting Services report server should note the following differences:

  • Report parameters in client report definitions (.rdlc) do not map to query parameters. There is no parameter input area in a client report definition that accepts values that are subsequently used in a query.

  • Client report definitions do not include embedded query information. You must define data sources that return ready-to-use data for the report.

  • Browser-based printing through the RSClientPrint ActiveX control is not available for client report definitions that run in the ReportViewer Web server control. The print control is part of the report server feature set.

If you are affected by these differences, you should either migrate to a Reporting Services installation or write application code that provides the functionality you require.

Special Considerations for using ReportViewer Controls in Non-managed C++ Windows Applications

When you use a ReportViewer control to process a report locally in a non-managed C++ Windows application, you will have to add the report as an embedded managed resource file. To set this linker property, from the Project menu, open the <Project> Properties, expand Configuration Properties, expand Linker, and click Input. In the Embed Managed Resource File box, type the name of the report file.

See Also

Concepts

Adding and Configuring the ReportViewer Controls
Configuring ReportViewer for Remote Processing