Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crystal Report in .NET Framework 4.0

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.

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.

The problem occurs at the constructor of ReportClass.

Exception's message:

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

InnerException's message:

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

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

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

like image 810
Donotalo Avatar asked Aug 30 '12 11:08

Donotalo


People also ask

Does Visual Studio 2022 support Crystal Reports?

Crystal report is not support visual studio 2022 - Visual Studio Feedback.

What version of Crystal Reports uses 13.0 2000?

13.0. 2000.0 is the assembly version.

Is SAP Crystal Reports runtime engine for .NET framework free?

NET Framework 4 (32-bit)' free to use.


1 Answers

It is likely to be X86/x64 problem.

try to compile your app to target 86 platform.

like image 151
a.boussema Avatar answered Sep 23 '22 09:09

a.boussema