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: %PROGRAMFILES%\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\ReportViewer\ReportViewer.exe. You can also download it 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 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:
Open the project properties page.
Click Publish, and then click Prerequisites.
Select Microsoft Visual Studio 2010 Report Viewer, and then click OK.
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 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 find the localized ReportViewer control redistributable at %PROGRAMFILES%\Microsoft SDKs\Windows\v7.0A\BootStrapper\Packages\ReportViewer\<lang>. You can also download any localized ReportViewer redistributable from the Web.
To use the localized version of the ReportViewer control redistributable that comes with Visual Studio, do the following:
Navigate to the folder that contains the language pack you want to use. Language pack folders are located at %PROGRAMFILES%\Microsoft SDKs\Windows\v7.0A\BootStrapper\Packages\ReportViewer\<lang>.
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.