解决Crystal Report XI R2不能在64操作系统正常工作的问题-web程序

原文: [原创]解决Crystal Report XI R2不能在64操作系统正常工作的问题-web程序

 

我更换了新的电脑,操作系统也从原来32位的windows 2003 R2升级到windows 2008 R2 x64, 由于客户的原因我们的报表部分必须用Crystal Report XI R2来完成,报表在原来的计算机上运行一直没有问题,但是在新的计算机上一直不能正工作,错误如下:

The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.

Stack Trace:

at CrystalDecisions.CrystalReports.Engine.ReportDocument.CheckForCrystalReportsRuntime()
at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()

 

Inner Exception:

An error has occurred while attempting to load the Crystal Reports runtime.

Either the Crystal Reports registry key permissions are insufficient or the Crystal Reports runtime is not installed correctly.

Please install the appropriate Crystal Reports redistributable (CRRedist*.msi) containing the correct version of the Crystal Reports runtime (x86, x64, or Itanium) required.  Please go to http://www.businessobjects.com/support for more information.

 

在我确定我安装了CRRedist2008_x64.msi和CRRedist2008_x86.msi 两个包后问题依旧如此, 其实问题根本就不是CRRedist2008_x64.msi和CRRedist2008_x86.msi 安装与否的问题, 后来我想到了Application Pools,问题果然出在这里, 以我的环境为例解决办法如下:

1. 打开IIS并选择你的Web程序所使用的application pool, 并点击右侧Actions栏中的Advanced Settings

1

2. 在打开的窗口中设置Enabled 32-Bit Applications为True,

2

 

只需要设置这一个属性就可以了,再次运行程序并打开报表,报表可以正常工作了。

 

另外:

  1. Crystal Report XI R2不能运行在64位作系统下
  2. 这种方式是错误的: 在VS2005/2008 中,鼠标右键点击引用Crystal Report XI R2的项目并选择Properties, 在打开的属性窗口选择Build标签,将Platform target设置为x86,再次运行程序时会报错。在64位操作系统中编译x86平台的能运行的程序必要设置Application Pool的Enable 32-Bit Applications
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值