.NET Framework 4.0中的Crystal Report [英] Crystal Report in .NET Framework 4.0

查看:377
本文介绍了.NET Framework 4.0中的Crystal Report的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经使用 Visual Studio 2010 .NET 3.5 编写了WPF应用程序。该解决方案包含8个项目-所有项目均在 .NET 3.5 中编译。该应用程序使用Crystal Report。目标操作系统是Windows 7。

We've a WPF application written in .NET 3.5 using Visual Studio 2010. The solution consists of 8 projects - all compiled in .NET 3.5. The application uses Crystal Report. Target OS is Windows 7.

最近,由于某些原因,启动项目 .NET 4.0 中进行了编译。第三方DLL依赖关系-这些DLL需要.NET 4.0。更改并重建解决方案后,Crystal Report引发异常。

Recently, the startup project is compiled in .NET 4.0 due to some 3rd party DLL dependency - those DLLs require .NET 4.0. After this change and rebuilding the solution, Crystal Report is throwing exception.

问题出现在 ReportClass 的构造函数中

The problem occurs at the constructor of ReportClass.

异常的消息:



的类型初始值设定项' CrystalDecisions.CrystalReports.Engine.ReportDocument'抛出
异常。

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

InnerException消息:

InnerException's message:


使用具有CLSID
的组件检索COM类工厂{4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B}由于以下
错误而失败: 80040154未注册类(HRESULT的异常:
0x80040154(REGDB_E_CLASSNOTREG))。

"Retrieving the COM class factory for component with CLSID {4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))."

我没有在Crystal工作报告之前。

I haven't worked in Crystal Report before. What could be the cause of this problem?

请注意,编译为.NET 3.5时不会发生此问题。在启动项目中使用了Crystal Report。

Please note that this problem doesn't occur when compiled as .NET 3.5. Crystal Report is used in the startup project.

推荐答案

可能是X86 / x64问题。

It is likely to be X86/x64 problem.

尝试将您的应用编译为目标86平台。

try to compile your app to target 86 platform.

这篇关于.NET Framework 4.0中的Crystal Report的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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