CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.: Could not load file or assembly

csimpson (4 posts)
May 17, 2021 02:58 PM
Accepted Answer

I am getting the below error:

Error An error occurred while processing the project: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.: Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
Exception detail: System.TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
   at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()
   --- End of inner exception stack trace ---
   at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor()
   at #Lwd.#Kwd.#Gh(String )
   at ArcanaDevelopment.ReportCommander.Engine.ProcessingEngine.#ek(Report )
   at ArcanaDevelopment.ReportCommander.Engine.ProcessingEngine.#5xd(Boolean )

 

I have looked at the note K00000572 - Report Commander fails if Crystal Reports runtime is upgraded. I compared the files in zip folder to the ones on the system I am working with and they are exactly the same. Is there another note I should look at?

This topic has an accepted answer. Jump to it.
Bill Staff (599 posts)
May 17, 2021 03:57 PM
Accepted Answer

Is this a new installation of Report Commander, or was it previously working? Was the Crystal Reports runtime already installed for another application? Report Commander 2.6 or something older?

Check in Add/Remove Programs for "SAP Crystal Reports runtime engine for .NET Framework" and see what version is installed. It should be 13.0.24.2970 if it was installed by Report Commander.

The simplest thing to do is uninstall Report Commander and also the Crystal Reports runtime and then reinstall Report Commander, which will reinstall the Crystal Reports runtime. But if there's another application using the runtime that may break it.

If you don't want to try that you could turn on fusion logging to get more information about what's really failing.

csimpson (4 posts)
May 18, 2021 10:27 AM
Accepted Answer

They are running Report commander 2.5 version 2.5. I know crystal was uninstalled and reinstalled but there was no version change. Crystal Reports 2016 SP8.  I have not tried uninstalling and reinstalling report commander. The project is not new but has errored out since. also this is not a new install of report commander.

The runtime they are running is below: 

 

 

Bill Staff (599 posts)
May 18, 2021 11:46 AM
Accepted Answer

It looks like you installed BO on 5/8. This installed a newer version of the runtime than what Report Commander uses and I assume that's when things broke.

Report Commander version 2.5 uses assembly version 13.0.2000.0 and the config files you mentioned tell it to use assembly version 13.0.3500.0 instead in cases where a newer runtime is installed.

Runtime version 13.0.25 (which you have now) still uses assembly version 13.0.3500.0 so it should still be working, but maybe there's some breaking change.

Please start by updating Report Commander to 2.6 and see if that resolves the problem. Report Commander 2.6 already uses 13.0.3500.0 so it will be a closer match to the newer runtime that just got installed.

You have the 64-bit runtime installed, so be sure to install the 64-bit version of Report Commander. I'm not sure what will happen if you install the 32-bit version and it tries to install an older version of the 32-bit runtime.

Actually it's possible that's what's gone wrong. Is your current Report Commander installation 32-bit (installed under "C:\Program Files (x86)\") or 64-bit (installed under "C:\Program Files\")? If you had the 32-bit version of Report Commander and the BO installation replaced the 32-bit runtime with the 64-bit runtime, that would break things.

csimpson (4 posts)
May 18, 2021 11:54 AM
Accepted Answer
Report commander is 32 bit it looks like. So maybe mix matched versions?
Bill Staff (599 posts)
May 18, 2021 01:18 PM
Accepted Answer
Sounds like that's the problem. Uninstall Report Commander and install the 64-bit version instead. If you're using 32-bit database drivers or ODBC aliases you're going to have to switch them to 64-bit as well. Alternatively you can try reinstalling the 32-bit version to reinstall the 32-bit runtime and see if that works, but it might break your CR/BO installations.
csimpson (4 posts)
May 18, 2021 09:35 PM
Accepted Answer
We installed the 32 bit runtime along side the 64 bit runtime and that fixed the issue.
Bill Staff (599 posts)
May 19, 2021 11:06 AM
Accepted Answer
Glad that worked. I will get the knowledge base article updated with this as an additional cause for the error.

Replies are disabled for this topic.