Deploy reports and ReportViewer controls rdlc and reportviewerrdlc
Deploy reports and ReportViewer controls
You can freely publish reports and ReportViewer controls as part of an application. Depending on the control type and whether the report is configured for local processing or remote processing, the deployment requirements are very different. In the same application, you can deploy locally processed reports or remotely processed reports.
Re-release the ReportViewer Control
The republishing ReportViewer control is a self-decompressed file named ReportViewer.exe, which includes a. msi file and other files. You can find ReportViewer.exe: C: \ Program Files \ Microsoft Visual Studio 8 \ SDK \ v2.0 \ BootStrapper \ Packages \ ReportViewer \ ReportViewer.exe in the following locations.
When ReportViewer.exe is run, the following files are copied to the Global Assembly Cache folder on the computer where the deployment is located.
File |
Description |
Microsoft. ReportViewer. Common |
Provides the common core report functions for ReportViewer Windows Forms controls and Web server controls. |
Microsoft. ReportViewer. ProcessingObjectModel |
Publish the report object model so that you can access it from the expressions in the report definition during running by programming. |
Microsoft. ReportViewer. WebForms |
Provides the ReportViewer Control for ASP. NET pages. |
Microsoft. ReportViewer. WinForms |
Provides the ReportViewer Control for Windows applications. |
Run ReportViewer.exe
The type of the control you use determines the location where ReportViewer.exe is run.
For ASP. NET applications, ReportViewer.exe should be run on the Web server that hosts the application.
For Windows Forms applications, add controls as essential for applications so that they are automatically installed along with the application. You can use the bootstrap application to automatically complete this step:
When installing the application, the system checks the local computer to see if ReportViewer is installed. If not, the installer will install it.
Deploy the localized version of The ReportViewer Control
The ReportViewer control contains language packs in eight languages: Simplified Chinese, traditional Chinese, French, German, Italian, Japanese, Korean, and Spanish. To use the localized version of the control, you must perform the following operations:
To use other languages in the ReportViewer control, you can implement Microsoft. reporting. webForms. IReportViewerMessages or Microsoft. reporting. winForms. the IReportViewerMessages interface allows you to create tooltip and other user interface text in a specific language.
Determine the browser Language and Culture settings
When using the ReportViewer Web Server Control to host reports in browser applications, if you want to provide a user interface that matches the browser Language and Culture settings, you must set the thread culture. ASP. NET does not set the thread culture based on the header information provided by the client. To make the application match the browser's regional settings, you can set System. Threading. Thread. CurrentCulture and System. Threading. Thread. CurrentUICulture in the application code. For more information about how to handle the application's regional settings, see System. Globalization. CultureInfo.
Precautions for deploying the Web server control of the report Viewer
Other configurations are required for deploying ASP. NET applications in the Web farm to ensure that the view status is maintained throughout the farm. If you deploy the ReportViewer Web Server Control in the Web environment, specifyMachineKeyElement. For more information, see ReportViewer's Web. config settings.
Reports processed in the ReportViewer Web Server Control have different browser requirements. Browser compatibility issues may affect the availability of some types of report functions. For more information, see browser support for the ReportViewer Web Server Control.
Distribute reports
Unless the client report definition (. rdlc) file is dynamically generated at runtime, the locally processed report is stored in the file system as the. rdlc file and must be provided together with the application. These files can be installed on the disk drive or compiled into the executable files of the application.
Reports processed on remote servers are stored on Microsoft SQL Server 2005 Reporting Services Report Server. The application does not contain any report file because the report is processed remotely and does not exist in the local system. To deploy a report published on the Report Server, you must have the permission to access the Report Server and ensure that the application user has the right to view the reports on the server. To deploy a server report, you must understand the identity authentication extensions used by the Report Server, as well as the role-based authentication mode that provides content access and operation permissions. For more information, see precautions for deploying server reports.