Walkthrough: Using the ReportViewer Control in Remote Mode
This walkthrough shows how to configure a ReportViewer control for remote processing mode. In this walkthrough, the processing mode is set for remote processing using a published report that runs on a SQL Server 2008 or later instance of Reporting Services report server. For more information, see Using the ReportViewer Tasks Smart Tags Panel and Adding and Configuring the ReportViewer Controls.
Prerequisites
You must have access to SQL Server 2008 or later instance of Reporting Services that contains published reports.
Perform the following steps to configure the processing mode for a ReportViewer control in a Windows Forms application project. For this example, you will be creating the application in Microsoft Visual C#.
Create a New Windows Application Project
On the File menu, point to New, and then select Project.
In the Installed Templates pane, expand Visual C#, and select Windows.
Click Windows Forms Application.
In the Name box, type the name of the project: ReportViewer Remote Processing.
In the Location box, enter the directory in which you want to save your project, or click Browse to navigate to it.
Click OK.
The Windows Forms Designer opens, showing Form1 of the project you created.
Add a ReportViewer control to the application
Click on Form1. Resize the form as desired.
From the Toolbox, in the Reporting group, drag the ReportViewer icon to the form.
Open the smart tags panel of the ReportViewer control by clicking the smart-tag glyph on the top right corner. Click Dock in parent container.
Configure the ReportViewer control for remote processing
In the smart tags panel, select <Server Report> in the Choose Report list. The smart tags panel expands to show Report Server Url and Report Path textboxes.
In Report Server Url, enter the Url for the report server. For example, type http://myservername/reportserver.
In Report Path, enter the path of the report on the server.
If the report server runs in native mode, the path name begins with the root / and includes the folders and report name. For example, type /AdventureWorks 2008 Sample Reports/Company Sales 2008.
If the report server runs in SharePoint integrated mode, the path name is a fully qualified URL. For example, type http://myserver/sites/mysite/mylibrary/AdventureWorks 2008 Sample Reports/Company Sales 2008.rdl.
To set additional server report properties, from the View menu, select Properties Window. From the reportviewer properties, expand the ServerReport node. You can now set additional properties such as DisplayName, HistoryId and Timeout.
Build and run the application
On the Build menu, click on Build Solution to build the application. As part of the build process, the report is compiled and any errors found (such as a syntax error in an expression used in the report) are added to the Task List.
Press F5 to run the application.
See Also
Reference
Concepts
Adding and Configuring the ReportViewer Controls