分类: C#/.net
2013-03-17 22:52:50
配置水晶报表组件首先,确认服务器上的报表组件的版本是否正确。
如果你使用的是
Deploy Crystal components
First, and rather obvious, is to make sure the correct version of Crystal components are installed on the server. If you have the Visual Studio SDK installed, you can look for CRRedist2005_x86.msi, which is in this folder C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\CrystalReports on your machine. Running that installation on the server will make sure all components required for Crystal Reports are properly installed on your machine.
If you have a setup project for your web application, you can add a merge module to that project. Crystal Reports provides four merge modules for download at . Depending on your needs, you may need to add any combination of these to your setup project. Which module is required for your application can be found in this document on the Business Objects support site.
Web.Config settings
In order for a Crystal Reports viewer to work, the following settings must be added to the appSettings section in the web.Config file:
This will ensure that the temporary images for Crystal are removed when they are no longer required. The following setting must be added the the httpHandlers section.
This is required, because otherwise all you will see is an empty box with a red cross in it.
aspnet_client files
Last, but certainly not least, check the aspnet_client folder in the root folder of your web site. This folder should contain a folder with the name CrystalReportWebFormViewer3. That folder must exist in the following path: system_web\2_0_50727. If that folder is not there, copy it from your local machine. It should be in the folder C:\WINNT\Microsoft.NET\Framework\v2.0.50727\ASP.NETClientFiles.