Deploying Reports and ReportViewer Controls

You can freely distribute reports and the ReportViewer controls as part of your application. Deployment requirements vary widely depending on the control type and whether your report is configured for local or remote processing. You can deploy locally processed and remotely processed reports in the same application.

Redistributing the ReportViewer Controls

The ReportViewer control redistributable is a self-extracting file named ReportViewer.exe that includes an .msi and other files. You can find ReportViewer.exe at the following location: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\ReportViewer\ReportViewer.exe.

When you run ReportViewer.exe, the following files are copied to the Global Assembly Cache folder on the deployment computer.

File Description

Microsoft.ReportViewer.Common

Provides core reporting functionality that is common to the ReportViewer Windows forms control and Web server control.

Microsoft.ReportViewer.ProcessingObjectModel

Exposes the report object model so that it can be accessed programmatically at run time from expressions in the report definition.

Microsoft.ReportViewer.WebForms

Provides the ReportViewer control for ASP.NET pages.

Microsoft.ReportViewer.WinForms

Provides the ReportViewer control for Windows applications.

Running ReportViewer.exe

The type of control you are using determines where ReportViewer.exe should be run.

  • For ASP.NET applications, run ReportViewer.exe on the Web server that hosts your application.

  • For Windows Forms applications, include the controls as an application prerequisite so that they are installed automatically with your application. You can use the bootstrapping application to automate this step:

    1. Open the project properties page.

    2. Click Publish, and then click Prerequisites.

    3. Select Microsoft Visual Studio 2008 Report Viewer, and then click OK.

    4. Publish the application.

During application installation, a check is performed on the local computer to see if ReportViewer is already installed. If it is not installed, the Setup program will install it.

Deploying Localized Versions of ReportViewer Controls

The ReportViewer control includes language packs for ten Visual Studio languages: Chinese-Simplified, Chinese-Traditional, French, German, Italian, Japanese, Korean, Portuguese (Brazilian), Russian, and Spanish. To use a localized version of the control, you must do the following:

  1. Run ReportViewer.exe.

  2. Navigate to the folder that contains the language pack you want to use. Language pack folders are located at <drive>:\Program Files\Microsoft SDKs\Windows\v6.0A\BootStrapper\Packages\ReportViewer\<lang>.

  3. Run ReportViewerLP.exe.

To use other languages in a ReportViewer control, you can implement the Microsoft.Reporting.WebForms.IReportViewerMessages or the Microsoft.Reporting.WinForms.IReportViewerMessages interface to create tooltips and other user interface text in a specific language.

Detecting Browser Language and Culture Settings

If you are using the ReportViewer Web server control to host reports in a browser application, be sure to set the thread culture if you want to provide a user interface that matches the browser language and culture settings. ASP.NET does not set the thread culture based on the header information provided by the client. To match your application to the culture settings of the browser, you can set System.Threading.Thread.CurrentCulture and System.Threading.Thread.CurrentUICulture in your application code. For more information about how to work with culture settings in your application, see System.Globalization.CultureInfo.

Deployment Considerations for the Report Viewer Web Server Control

Deploying an ASP.NET application in a Web farm requires additional configuration to ensure that view state is maintained across the farm. If you are deploying the ReportViewer Web server control in a Web farm environment, you should specify the machineKey element in your application's Web.config file. For more information, see Web.config Settings for ReportViewer.

Reports that are processed in the ReportViewer Web server control have varying browser requirements. Browser compatibility issues can affect the availability of some kinds of report functionality. For more information, see Browser Support for ReportViewer Web Server Controls.

Distributing Reports

Unless you are dynamically generating client report definition (.rdlc) files at run time, reports that are processed locally are stored on the file system as .rdlc files and must ship with your application. The files can be installed on the disk drive, or compiled into the application executable.

Reports that are processed on a remote server are stored on a Microsoft SQL Server 2005 Reporting Services report server. There are no report files to include in your application because the reports are processed remotely and do not exist on the local system. To deploy reports that are published on a report server, you must provide ongoing access to a report server and ensure that application users are authorized to view reports on that server. Deploying server reports requires an understanding of the authentication extension used by the report server and the role-based authorization model that provides access to content and operations. For more information, see Deployment Considerations for Server Reports.

See Also

Tags :


Community Content

Rick van den Bosch
Location of ReportViewer.exe

If you're unable to find ReportViewer.exe in the following location as stated above (C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\ReportViewer\ReportViewer.exe), have a look at these alternative locations instead. The 2008 version of the Report Viewer Redistributable can be found there.

For x86 based machines:

C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\ReportViewer

For x64 based machines:
C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\ReportViewer


AndyAtBeckbury
ASP.NET ReportViewer control in a load-balanced environment - rsExecutionNotFound

If using the ASP.NET ReportViewer control within a load-balanced Web Application (Web Farm) there is an additional consideration to make.

The ReportViewer control establishes a session with the Report Server. This session is based upon the account under which the ReportViewer control is executing.
For example, on an IIS7 server in Integrated Pipeline mode, the account is by default "Network Service", or in other words DOMAIN\MACHINENAME$.

If you are viewing the report viewer on one node, and then are suddenly switched, the ReportViewer control attempts to use the same session. Only this time the machine name has changed, therefore the account registered with the session has changed, and you get the error Execution '[uniqueId]' cannot be found (rsExecutionNotFound). This occurs even if you have turned off snapshots, session timeouts and all of the other suggestions found on the Web.

If you want to check this is the trigger, its best to debug your current node name out to the HTML output and see the error occur when it switches.
This may occur randomly, depending upon the nature of your load balancer.

The solution is to use a common domain user across for accessing the Report Server, across all of the nodes in the Web Farm. Use the ReportServerCredentials property on the ServerReport object.
I've posted an example here. http://www.andypotts.com/Blog/2009/03/30/rsExecutionNotFoundWithReportViewerInALoadBalancedReportingServicesEnvironment.aspx

Lots of people seem to be getting this, without much sucess. I did too, until I eventually found a little nugget hidden away in the ether. (http://social.technet.microsoft.com/Forums/en-US/sqlreportingservices/thread/1eb12568-bfea-4e4e-bd09-1f09b055c595/) and (http://blogs.msdn.com/jgalla/archive/2008/08/08/scaling-out-the-viewer-control-and-rsexecutionnotfound.aspx).

I hope this saves you some pain.


Page view tracker