Share via


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

  1. On the File menu, point to New, and then select Project.

  2. In the Installed Templates pane, expand Visual C#, and select Windows.

  3. Click Windows Forms Application.

  4. In the Name box, type the name of the project: ReportViewer Remote Processing.

  5. In the Location box, enter the directory in which you want to save your project, or click Browse to navigate to it.

  6. Click OK.

    The Windows Forms Designer opens, showing Form1 of the project you created.

Add a ReportViewer control to the application

  1. Click on Form1. Resize the form as desired.

  2. From the Toolbox, in the Reporting group, drag the ReportViewer icon to the form.

  3. 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

  1. 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.

  2. In Report Server Url, enter the Url for the report server. For example, type http://myservername/reportserver.

  3. 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.

  4. 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

  1. 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.

  2. Press F5 to run the application.

See Also

Reference

IReportServerCredentials

Concepts

Adding and Configuring the ReportViewer Controls

Other Resources

Samples and Walkthroughs