Windows 7 上 VS 的 Crystal Reports 运行时引发错误 [英] Crystal Reports Runtime for VS on Windows 7 Throws an Error

查看:19
本文介绍了Windows 7 上 VS 的 Crystal Reports 运行时引发错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它似乎在我的开发机器或 Windows XP 测试机器上运行良好,但我在 Windows 7 测试机器上遇到了问题.

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.

之后,我得到一个正常的崩溃错误:

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

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

Note: It is Windows 7 64bit, but I'm already running the program in 32bit mode.

更新:

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

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.
I have verified that if I uninstall the x64 version, and install the x86 32bit version, the program works fine. 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.

我将这个问题留待一会儿,希望有人知道如何让它初始化 64 位版本,因为这是在设置后点击自动安装的内容.

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.

推荐答案

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

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. This means that VS can be set to compile for Any CPU.

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

这篇关于Windows 7 上 VS 的 Crystal Reports 运行时引发错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆