rainforestnet / CrystalReportsNinja

A small Windows Console App that loads external Crystal Reports file, takes parameter inputs and export to various format or even print to printer
http://www.rainforestnet.com
93 stars 77 forks source link

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

Open ChristopherSouth opened 6 years ago

ChristopherSouth commented 6 years ago

Just installed the pre-reqs and crystal ninja - here's the command i tried - followed by the error.. c:\CrystalReportsNinja -U portalreadonly -P xxxxxxxx -F c:\Completions_by_WorkCenter.rpt -E pdf

What is the "type initalizer"?

Exception: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. Inner Exception: System.TypeInitializationException: The type initializer for 'CrystalDecisions.Shared.SharedUtils' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. at CrystalDecisions.Shared.SharedUtils..cctor() --- End of inner exception stack trace --- at CrystalDecisions.Shared.SharedUtils.get_CurrentControl() at CrystalDecisions.Shared.SharedUtils.GetEffectiveCulture() at CrystalDecisions.CrystalReports.Engine.CREngineRes.GetString(String name) at CrystalDecisions.CrystalReports.Engine.ReportDocument.CheckForCrystalReportsRuntime() at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()

sunk818 commented 6 years ago

Are you certain the pre-requisites were installed properly? Did you install the following?

What OS are you using? Windows 10? 32-bit or 64-bit?

.NET 4.5 https://www.microsoft.com/en-us/download/details.aspx?id=30653

ChristopherSouth commented 6 years ago

Thx for the follow-up. I didn’t check back on the requirements as I found that the free version of Logicity works good enough for our purpose. Chris

From: sunk818 notifications@github.com Sent: Sunday, April 15, 2018 3:01 AM To: rainforestnet/CrystalReportsNinja CrystalReportsNinja@noreply.github.com Cc: ChristopherSouth ChristopherSouth@msn.com; Author author@noreply.github.com Subject: Re: [rainforestnet/CrystalReportsNinja] The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. (#23)

Are you certain the pre-requisites were installed properly? Did you install the following?

What OS are you using? Windows 10? 32-bit or 64-bit?

.NET 4.5 https://www.microsoft.com/en-us/download/details.aspx?id=30653

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/rainforestnet/CrystalReportsNinja/issues/23#issuecomment-381384951, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEBhqn5CzjTSLZRNoGFo5VDa_nqeksAhks5tovAQgaJpZM4TVL9k.

danielleevandenbosch commented 3 years ago

I am running windows 10 64 bit and am experiencing the same issue. My computer says I have crystal runtime installed already. Please help

mhertzfeld commented 3 years ago

@danielleevandenbosch Please post an issue over on my fork and I will try to help.

To start with please include the following in the issue you create. Exception\Error you are getting Version of Ninja you are running (please include whether x86 or x64) Version of Crystal Reports Runtime installed (note whether x86 or x64 or both are installed and their individual version numbers)