Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8852

Re: C# Windows forms shows The type initializer for 'CrystalDecisions.ReportSource.ReportSourceFactory' threw an exception.

$
0
0

Hi Sajid,

 

The client Profiles is what usually causes this error.  The target framework should always be either 4 or 4.5.  Seeing as you used both, I'm wondering if the problem is with the .NET Framework itself.

 

You upgraded from .NET 4 to 4.5.  If there was a problem with .NET 4 originally then the update may not have addressed it.  I've had to repair the framework before and the best way to do it is uninstall all the .NET framework components and then download and install the full 4.5 or 4.5.1 package from Microsoft.

 

You have all the basic references in your project for Crystal so it's a matter of why won't the project load them.  As I said, the most common reason is because the wrong framework is set in the project properties.

 

If you have set them and rebuilt the solution after each try then the problem may be with the framework itself.  I'm just guessing at this point because what you have said here should work.

 

An experiment would be to create a new solution and in the project add the Crystal viewer and references.  Make sure the target framework is correct.  Drop a button on the form that calls a report.  Does that work?

 

Good luck,

Brian


Viewing all articles
Browse latest Browse all 8852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>