cancel
Showing results for 
Search instead for 
Did you mean: 

The type Initializer for CrystalDecisions.CrystalReports.Engine.ReportDocument

0 Kudos

Dear Friends,

I am encountering this error on 64 bit CLIENT MACHINE. The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.

To understand the issue, let’s have the Development and Client machines detail.

These are installed on Development Machine.
==================================

1- Windows 10 Home (64 bit)
2- SAP Crystal Reports, version For Microsoft Visual Studio (Version 13.0.23.2819)
3- SAP Crystal Reports runtime engine for .NET Framework (64-bit) (Version 13.0.23.2819)
4- Microsoft Visual Studio 2010

In the project, all Crystal Report References e.g. CrystalDecisions.CrystalReports.Engine version is
RuntimeVersion = v2.0.50727
Version = 13.0.3500.0

It WORKS perfectly on development machine.

For 32 bit Client
==============
1- CRRuntime_32bit_13_0_23.msi
Output of this installation is SAP Crystal Reports runtime engine for .NET Framework 32-bit
(Version 13.0.23.2819)
3- Application Setup

It also WORKS perfectly.

Problem starts, when we deploy the same application on 64 bit CLIENT. We installed
================================================================
1- CRRuntime_64bit_13_0_23.msi
Output of this installation SAP Crystal Reports runtime engine for .NET Framework 64-bit
(Version 13.0.23.2819)
3- Application Setup

It DOES NOT work and shows this error message, while viewing the report.
The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.

To solve this issue, we tried the project ALL compilation option ANY PC, 64 bit or etc… But it also DOES NOT work at all.

Finally, we installed on Client Machine as follow.
========================================

1- Microsoft Visual Studio 2010
we installed VS because without this we cannot install SAP Crystal Reports, version For Microsoft Visual Studio.

2- SAP Crystal Reports, version For Microsoft Visual Studio (Version 13.0.23.2819)
3- SAP Crystal Reports runtime engine for .NET Framework (64-bit) (Version 13.0.23.2819)

After installing these above mentioned, report works fine on 64 bit CLIENT even we uninstalled the VS. It means there no problem in the compilation options ANY PC, 64 bit or etc...

You can understand that it is not easy to install these all on client to run the report.

I would be very glad to have a solution to get rid of these unnecessary installations on client. I prefer to install SAP Crystal Reports runtime engine for .NET Framework (64-bit) (Version 13.0.23.2819) and the application development like as it works on 32 bit client machine.

Kindly try to resolve the issues because we are surfing a lot.

Thanks in advance.

Muhammad Faisal

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

I suspect that your application is compiled as a 32-bit application. The "bit-ness" of the runtime install should match that of the application. So,I would try uninstalling the 64-bit version of the SDK and then installing the 32-bit version and see whether that will work for you.

-Dell

0 Kudos

Dear Dell, Thanks a lot for your reply. First, I tried to compile the application on 64/32 bit and deployed but had the SAME RESULT on the 64-bit client machine. Second, I uninstalled the 64-bit version of the SDK and install the 32-bit version but had the SAME RESULT. Third, I installed both versions but had the SAME RESULT. Lastly, I uninstalled both versions and reinstall them then it works FINE. However, it is not normal behavior that is why I am still wondering why I had to do the LAST step instead of one go installation of a 64-bit version of the SDK. Thanks again.

DellSC
Active Contributor
0 Kudos

I'm not absolutely certain why that happened - it's not a usual occurrence. It might have been an access rights issue - you must have admin rights on the server when installing the runtime - but I can't say that for sure.

-Dell

Answers (0)