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 download ReportViewer.exe from the Microsoft Download Center.
|Different versions of the ReportViewer control redistributable can be installed on the same computer.|
When you run ReportViewer.exe, the following files are installed in the Global Assembly Cache folder on the deployment computer.
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. This must be done by a server administrator.
For Windows Forms ClickOnce applications, include the controls as an application prerequisite so that they are installed automatically with your ClickOnce application. You can use the bootstrapping application to automate this step:
Open the project properties page.
Click the Publish tab, and then click the Prerequisites button.
Select Microsoft Visual Studio 2012 Report Viewer, and SQL Server CLR Types then click OK.
Make sure that the Download prerequisites from the component vendor’s website option is checked. This is the only supported option. Then, click OK.
Click the Options button.
In the Deployment tab, specify a deployment Web page and select the Automatically generate deployment web page after ever publish checkbox.
Click OK and publish the application.
- Open the project properties page.
Deploying Localized Versions of ReportViewer Controls
The ReportViewer control redistributable is localized into ten Visual Studio languages: Chinese-Simplified, Chinese-Traditional, French, German, Italian, Japanese, Korean, Portuguese (Brazilian), Russian, and Spanish. If you install a localized version of Visual Studio, you can download any localized ReportViewer redistributable from the Microsoft Download Center.
To use other languages in a ReportViewer control, you can implement the Microsoft.Reporting.WebForms.IreportViewerMessages3 or the Microsoft.Reporting.WinForms.IreportViewerMessages3 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 Report Files
Unless you are dynamically generating client report definition at run time by using the LocalReport.LoadReportDefinition or ServerReport.LoadReportDefinition method, you have a few different options for distributing your report files with your application, depending on the processing mode of the report viewer control.
Reports that are processed locally can be stored in a network folder or compiled into the application executable. Reports that are processed on a remote server are typically stored on a SQL Server Reporting Services report server. Unless you want to use the ServerReport.LoadReportDefinition method to manually load a report from a location other than the report server, there are no report files to include in your application. 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.
Copyright © 2012 by Microsoft Corporation. All rights reserved.