简体   繁体   English

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

[英]Crystal Reports Runtime for VS on Windows 7 Throws an Error

It seems to be working fine on my development machine, or the Windows XP test machines, but I'm running into problems on the Windows 7 test machines. 它似乎在我的开发机器或Windows XP测试机器上运行良好,但我在Windows 7测试机器上遇到了问题。

在此输入图像描述

After that, I get a normal crash error: 之后,我收到正常的崩溃错误:

************** 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 ---

Their website is of course a nightmare to find anything... 他们的网站当然是寻找任何东西的噩梦......

Note: It is Windows 7 64bit, but I'm already running the program in 32bit mode. 注意:它是Windows 7 64位,但我已经在32位模式下运行程序。

Update: 更新:

So I figured out that crystal reports has an issue where the x64 version doesn't have any initializers, and so trying to initialize it in my program is causing an error. 所以我发现水晶报告存在x64版本没有任何初始化程序的问题,因此尝试在程序中初始化它会导致错误。
I have verified that if I uninstall the x64 version, and install the x86 32bit version, the program works fine. 我已经验证,如果我卸载x64版本,并安装x86 32位版本,该程序工作正常。 I've read that some people had sucess just running the program in 32bit mode, but for whatever reason that didn't work for me. 我读过有些人只是在32位模式下运行程序,但无论出于何种原因,这对我来说都不起作用。

I'm leaving the question open for a little bit, in hopes that someone has figured out how to get it to initialize the 64 bit version, because that's what automatically installs from the click once setup. 我暂时搁置了这个问题,希望有人知道如何让它初始化64位版本,因为这是自设置点击后自动安装的内容。

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

The newest version of Crystal Reports for Visual Studio 2010 version 13.0.1 (x64) will work if the program is also run in x64 mode. 如果程序也以x64模式运行,则最新版本的Crystal Reports for Visual Studio 2010版本13.0.1(x64)将起作用。 This means that VS can be set to compile for Any CPU. 这意味着可以将VS设置为针对任何CPU进行编译。

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

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

This error could also occur if you are running a 64 bit desktop/server & you don't have a 64 bit runtime.You'll need to know which version of runtime to install. 如果您运行64位桌面/服务器并且没有64位运行时,也可能发生此错误。您需要知道要安装的运行时版本。 As always google is your best friend to search for locations of the runtime 一如既往谷歌是您搜索运行时位置的最佳朋友

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM