Getting a type initializer error from CrystalReportViewer control in upgraded VS .NET app

R

Rod

I've got Crystal Reports XI Release 2, for development with Visual Studio
..NET 2005. I've taken a VS .NET 2003 WinForms application that I wrote in
C#, and upgraded it to VS .NET 2005. It has just one WinForm, and one
CrystalReportViewer control on it. After letting the upgrade wizard do its,
I attempted to run the application, however it died on the line in the
InitializeComponent() method where it was attempting to create a new
CrystalDecisions.Windows.Forms.CrystalReportViewer control and assign it to
the CRV on the form. I got the following error:

System.TypeInitializationException was unhandled
Message="The type initializer for
'CrystalDecisions.ReportSource.ReportSourceFactory' threw an exception."
Source="CrystalDecisions.Windows.Forms"
TypeName="CrystalDecisions.ReportSource.ReportSourceFactory"
StackTrace:
at CrystalDecisions.Windows.Forms.CrystalReportViewer..ctor()
at AllClientsForISR.Form1.InitializeComponent() in D:\AMCI
Apps\AllClientsForISR\Form1.cs:line 75
at AllClientsForISR.Form1..ctor() in D:\AMCI
Apps\AllClientsForISR\Form1.cs:line 42
at AllClientsForISR.Form1.Main() in D:\AMCI
Apps\AllClientsForISR\Form1.cs:line 170
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

The inner exception is:
The type initializer for 'CrystalDecisions.Shared.SharedUtils' threw an
exception.
" at CrystalDecisions.Shared.SharedUtils.GetFullTypeName(Type type)\r\n
at CrystalDecisions.ReportSource.ReportSourceFactory..cctor()"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top