.NET Framework 4.0中的Crystal Report

编程入门 行业动态 更新时间:2024-10-26 02:27:06
本文介绍了.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

本文发布于:2023-11-09 05:24:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1571498.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Framework   NET   Report   Crystal

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!