1

How do I set compiler option to any CPU in Visual Studio.NET 2002? I am trying to run windows application on 64 bit CPU's and its throwing error for loading crystal report files. Rest of the application runs fine except crystal report (.rpt) files.

Following is the error message:

Error Message : just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text ************** System.TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {CF76A644-314B-404D-8D45-F08B51FF990B} failed due to the following error: 80040154. at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()

Dariusz Woźniak
  • 9,640
  • 6
  • 60
  • 73
MEngineer
  • 33
  • 6

1 Answers1

0

You just did not install Crystal Reports on the target machine property.

It also may turn out that you've installed a 32-bit version Crystal Reports but running your application on 64-bit OS or vice versa. In this case if the required version of Crystal Reports is not available and you can't compile the your project for the desired target platform, you may use corflags utility to change target platform on your compiled assemblies. But be aware of potential problems if you use Interop!

Dmitry Egorov
  • 9,542
  • 3
  • 22
  • 40
  • Dmitry, thanks for your kind response. I am having this issues with specific PC's, it works fine on rest of the PC's . I have not installed crystal reports on any of these PC's all dll's will be installed as part of .EXE. It use to work completely fine on some PC's and all of a sudden it's throwing error irrespective of 32 or 64 bit . I also verified registry for crystal decisions it looks fine on all PC's – MEngineer Mar 17 '17 at 17:17