Windows 7上的Crystal Reports Runtime for VS引发错误

时间:2011-06-23 20:30:20

标签: visual-studio crystal-reports

它似乎在我的开发机器或Windows XP测试机器上正常工作,但我在Windows 7测试机器上遇到了问题。

enter image description here

之后,我收到正常的崩溃错误:

************** Exception Text **************
System.InvalidOperationException: An error occurred creating the form. See
Exception.InnerException for details.  The error is: The type initializer for
'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> 
System.TypeInitializationException: The type initializer for 
'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> 
CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: 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.
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.CheckForCrystalReportsRuntime()
   at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()
   --- End of inner exception stack trace ---
   at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor()
   at CrystalDecisions.CrystalReports.Engine.ReportClass..ctor()
   at Processing.LogTag..ctor()
   at Processing.frmPrint.InitializeComponent()
   at Processing.frmPrint..ctor()
   --- End of inner exception stack trace ---

他们的网站当然是寻找任何东西的噩梦......

注意:它是Windows 7 64位,但我已经在32位模式下运行该程序。

更新

所以我发现水晶报告存在x64版本没有任何初始化程序的问题,因此尝试在程序中初始化它会导致错误。
我已经验证,如果我卸载x64版本,并安装x86 32位版本,该程序工作正常。我读过有些人只是在32位模式下运行程序,但无论出于何种原因,这对我来说都不起作用。

我将这个问题暂时搁置一下,希望有人知道如何让它初始化64位版本,因为这是自设置点击后自动安装的。

4 个答案:

答案 0 :(得分:3)

如果程序也以x64模式运行,则最新版本的Crystal Reports for Visual Studio 2010版本13.0.1(x64)将起作用。这意味着可以将VS设置为针对任何CPU进行编译。

http://www.sdn.sap.com/irj/boc/support?rid=/webcontent/uuid/d01fdad8-44e5-2d10-61ad-9d2d4158f3a8

答案 1 :(得分:3)

首先将您项目的平台目标更改为x86,然后再次编译并在Windows 7 64位PC中安装此设置(C:\ Program Files \ Microsoft Visual Studio 8 \ SDK \ v2.0 \ BootStrapper \ Packages \ CrystalReports \ CRRedist2005_x86.msi)并尝试打开您的报告。

答案 2 :(得分:1)

我们通过将应用程序池高级设置启用32位应用程序设置为true来修复此问题

答案 3 :(得分:0)

如果您运行的是64位桌面/服务器,则可能会发生此错误。你没有64位运行时。你需要知道要安装哪个版本的运行时。一如既往谷歌是您搜索运行时位置的最佳朋友

相关问题