Skip to Content
0
Former Member
Dec 22, 2011 at 01:19 PM

Crystal Reports COM Error

145 Views

I have a Crystal Report that I load and run from an ASP.Net Web Application. It works fine on my machine. However when the code is deployed to the servers, intermittently (does not happen everytime), I receive the following exception:

System.IO.FileLoadException: Retrieving the COM class factory for component with CLSID {XXX}  failed due to the following error: 8007045a.
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.CreateRptDoc()
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper..ctor()
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Initialize()
at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor()
at CrystalDecisions.CrystalReports.Engine.ReportClass..ctor()

When I search for this error I am not able to find the exact cause of the COM error 8007045a or the System.IO.FileLoadException. But many people have encountered other COM Errors with Crystal Reports and have suggested changing the Project properties -> Build -> Platform Target to x86 from 'Any CPU'.

Is this indeed the action to be taken for the COM error 8007045a or the System.IO.FileLoadException too?

One of the folks suggested the following: It is a low-level Windows error, not a COM error. The DllMain() entrypoint of one of the unmanaged code DLLs used by CR returned FALSE.

Any suggestions here?

Thanks in advance

Vikas

Edited by: vikasmanghani on Dec 22, 2011 3:53 PM