✔ The Type Initializer For 'Crystaldecisions.Crystalreports.Engine.Reportdocument' Threw An Exception
installShield.
Some error will be like
In a staging / production environment (where you don't have Visual Studio installed), you'll need to either:
dll file version will not cause any issues.
In your developer machine you confirm it same.
references :
http://stackoverflow.com/questions/16658300/the-type-initializer-for-crystaldecisions-crystalreports-engine-reportdocument
http://stackoverflow.com/questions/2866831/an-error-occurred-creating-the-form-see-exception-innerexception-for-details-t
See you next lessons ..... Sumber http://scqq.blogspot.com
Some error will be like
An error occurred creating the form. See Exception.InnerException for details. The error is: Object reference not set to an instance of an object. The error is : The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception
Solutions 1:
When a static constructor throws an exception, it is wrapped inside a TypeInitializationException. You need to check the exception object's InnerException property to see the actual exception.In a staging / production environment (where you don't have Visual Studio installed), you'll need to either:
- Trace/Log the exception and its InnerException (recursively): Add an event handler to the AppDomain.UnhandledException event, and put your logging/tracing code there. Use System.Diagnostics.Debug.WriteLine for tracing, or a logger (log4net, ETW). DbgView (a Sysinternals tool) can be used to view the Debug.WriteLine trace.
- Use a production debugger (such as WinDbg or NTSD) to diagnose the exception.
- Use Visual Studio's Remote Debugging to diagnose the exception (enabling you to debug the code on the sasaran computer from your own development computer).
Solutions 2 :
If you are installing on a 64-bit machine, make sure the application properties under the Build tab have "Any CPU" as the platform target, and unselect the check box for "Prefer 32-bit" if you have the option. Crystal is very touchy about 32/64 bit assemblies, and makes some pretty counterintuitive assumptions which are very difficult to troubleshoot.Solution 3 :
- i set x86 for my application, then i set x64 for my setup application
- Prerequisite: i Placed the supporting CR runtime file CRRuntime_32bit_13_0_10.msi, CRRuntime_64bit_13_0_10.msi in the following directory C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\Crystal Reports for .NET Framework 4.0
- Include merge module file to the setup project. Here is version is not serious thing because i use 13.0.10 soft, 13.0.16 merge module file File i included: CRRuntime_13_0_16.msm This file is found one among the set msm files.
dll file version will not cause any issues.
In your developer machine you confirm it same.
List Video Tutorial VB.NET For beginners
List Video tutorials C# for Beginners
references :
http://stackoverflow.com/questions/16658300/the-type-initializer-for-crystaldecisions-crystalreports-engine-reportdocument
http://stackoverflow.com/questions/2866831/an-error-occurred-creating-the-form-see-exception-innerexception-for-details-t
See you next lessons ..... Sumber http://scqq.blogspot.com
0 Response to "✔ The Type Initializer For 'Crystaldecisions.Crystalreports.Engine.Reportdocument' Threw An Exception"
Posting Komentar