Skip to main content
Solved

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

  • February 27, 2019
  • 7 replies
  • 15799 views

Johan van Eijsden
Captain
Forum|alt.badge.img+6
A customer has migrated to Windows Server 2016 (64 bit) and now our reports (Crystal Reports) don't start anymore. The error message is:

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

The Thinkwise applicatie that the customer is working with has been developed with TSF 2017.1.
The version Windows GUI is 2018.1.17.
The SAP Crystal Reports runtime engine for .NET framework (64 bit) is 13.0.13.1597.

I have two questions:
1. What causes this error?
2. What determines which version of the SAP Crystal Reports runtime enige I should install?

Could anyone help me out here?

Best answer by Anne Buit

Hi Johan,

There is a version checker in the Developer tab in the Windows GUI that can be used to check missing dependencies. See if any Crystal Reports dependencies light up. It could be that the migration somehow deregistered some Crystal Reports assemblies from the GAC. But I can't say this for sure.

The current supported versions of Crystal Reports can be found in the documentation, here. You can try to update the runtime to see if this resolves the issue.
View original
Did this topic help you find an answer to your question?
0% found this helpful
This topic has been closed for comments

7 replies

Anne Buit
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 634 replies
  • Answer
  • February 28, 2019
Hi Johan,

There is a version checker in the Developer tab in the Windows GUI that can be used to check missing dependencies. See if any Crystal Reports dependencies light up. It could be that the migration somehow deregistered some Crystal Reports assemblies from the GAC. But I can't say this for sure.

The current supported versions of Crystal Reports can be found in the documentation, here. You can try to update the runtime to see if this resolves the issue.

Johan van Eijsden
Captain
Forum|alt.badge.img+6
Hi Anne,

The problem was solved in the previous case. I updated the Crystal Reports runtime engine to version 13.0.20. But unfortunately I have a simulair problem in another case. The Windows GUI 2018.3.18.0 is being used here.

Error message (sorry, it's in Dutch):
De type-initialisatiefunctie voor CrystalDecisions.CrystalReports.Engine.ReportDocument heeft een uitzondering veroorzaakt.

Translated (probably):
The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception

Version checker Thinkwise:
CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304

Installed version of the Crystal Reports runtime engine for .NET Framework (64-bit): 13.0.20.2399

What causes this crash?

Anne Buit
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 634 replies
  • May 20, 2019
Hi Johan,

I installed the exact version of the CR runtime but could not reproduce this. Are you certain this version of the CR runtime is the only installed version on this client? There is no 32-bit version lingering?

Can you confirm this problem is not specific to Windows GUI version 2018.3.18.0, perhaps by testing with the 2018.1.17 version you mentioned earlier?

Johan van Eijsden
Captain
Forum|alt.badge.img+6
Yes I am sure that only one version of the Crystal Reports engine (13.0.20.2399 64-bit) has been installed on the client.

I did some more tests and you are right!

First I copied the files of the Windows GUI 2018.1.17 to new folder and started the application. That worked fine. Then I copied the files of the Windows GUI 2018.3.18 to a new folder and started the application from that folder. I was supprised to see that everything worked fine too!

In this specific case the application was started from an App-V 5 package. So the problem must be in the App-V 5 package.

Anne Buit
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 634 replies
  • May 22, 2019
Hi Johan,

Good to hear you've isolated the problem.

Let us know when you find a solution for this Crystal Reports problem in the App-V 5 package for future reference.

Anne Buit
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 634 replies
  • May 23, 2019
@Johan van Eijsden,

I ran into various similar cases where the length of the installation path of the CR runtime in the App-V 5 package turned out to be the problem.

Can you somehow try shortening the installation path for the runtime in the package?

Johan van Eijsden
Captain
Forum|alt.badge.img+6
Hi Anne,

Thanks for the tip! I will ask Centric if this helps and I will keep you informed.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings