cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports 2010 .NET 4.0 COM class factory 80000003 error

Former Member
0 Kudos

I am having the following error occur on a PDF generated by Crystal Reports via an ASP.NET 4.0 web page when deployed to the server:

Retrieving the COM class factory for component with CLSID {F734A321-8381-4FFD-A614-139E8906DC83} failed due to the following error: 80000003 One or more arguments are invalid (Exception from HRESULT: 0x80000003).

The offending code is:

ReportDocument reportdoc = new ReportDocument();

I am using the following DLLS:

CrystalDecisions.CrystalReports.Engine;

CrystalDecisions.Shared;

These are both version 13.0.2000.0 and I'm also referencing CrystalDecisions.Web and CrystalReports.ReportSource in the project (also the same version 13.0.2000.0).

I am targeting the project to build as an x86 per suggestions as well.

I have installed the CRRuntime_32bit_13_0 to the server (running Windows Server 2008 and IIS 7) and have verified that there is only one .config on the web app, yet I still receive this error. I have tried reinstalling the runtime multiple times. I have not seen any installation log files generated (not sure where to look)

Please advise.

Thanks

Edited by: travis.burgess on Feb 10, 2012 5:52 PM

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

The GIUD resolves to clientdoc.dll.

Did you get any errors re. registering clientdoc.dll , etc., when you were installing the CR runtime?

Are you able to manually register the clientdoc.dll using regsvr32?

The dll is in C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\clientdoc.dll.

Ludek

Follow us on Twitter http://twitter.com/SAPCRNetSup

Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Former Member
0 Kudos

Thanks for the quick response Ludek.

When I try to perform regsvr32 this dll I get:

"The module "clientdoc.dll" was loaded but the call to DllRegisterServer failed with error code 0x80070005."

Also, in case it's related..

I have used Dependency Walker to try to track down dependencies on this dll and there are quite a few missing. I tried installing the Visual C++ 2005 SP1 Redist as suggested by a previous thread years ago to resolve the missing dlls but they are still missing. The dlls are:

MSVCR80.dll

GPSVC.dll

IESHIMS.dll

MF.dll

MFPLAT.dll

MFREADWRITE.dll

WLANAPI.dll

former_member183750
Active Contributor
0 Kudos

Hello Travis

I suspect the issue is a file called cryptocme2.dll. The following are notes from a phone case I worked on recently. Please see if this applies to your situation.

 

After a Computer Associates update, an application which uses Crystal Reports for Visual Studio 2010 
(CRVS2010) runtime failed to run with the error: Invalid Access to memory location. 

  Attempting to update the CR runtime to Service Pack 2 failed to register a number of Crystal Reports 
COM dlls with the error: "1904. Module C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for . 
NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\<a number of files 
here> failed to register". See KB 1534393 - "Error 1904. Module C:\Program Files\SAP BusinessObjects\. 
.\dtsagent.dll failed to register ..." when installing Crystal Reports for Visual Studio 2010 MSI runtime, 
for more details. 

Using the Process Monitor utility it was determined that regsvr32.exe was using the file cryprocme2.dll 
from the Computer Associates folder (D:\program files\netergrity\ETPKI\lib). After renaming this dll, to 
*.new, registration of all CR dlls completed successfully. 

The application that runs Crystal Reports also ran without errors. 

When the cryptocme2 file in the netegrity folder was renamed back to cryptocme2.dll , the application 
that runs Crystal Reports fails again. 

Options: 

1) Rename the cryptocme2.dll in the netegrity folder to cryptocme2.new and copy the cryptocme2.dll 
from the C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\ 
Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86 folder to the netegrity folder. 

2) Install the Crystal Reports application on a different server. 

3) Wait until RSA (creators of the cryptocme2.dll) release a new version of the dll that they are building 
at this time. This new build will work-around the Computer Associates path environment variable which 
ensure that the CA dll is loaded preferential to the CR cryptocme2.dll. 

4) Roll back the recent CA update as before this update the Crystal Reports application was working. 

Additional information: 
1) SAP has contacted Computer Associates on this issue and Ticket 20561884 was created by CA 
with all details of the issue. 

2) Once RSA releases the new dll (end of Q1) Business Objects may implement the dll in an upcoming 
Service Pack (SP 4 or later). No ETA for SP 4 is set. However to setup expectations, SP 4 would release 
mid 2012 at the earliest and there is no guarantee that the new cryptocme2.dll will be part of this build. 
Cryptocme2.dll affects all SAP Business objects products and thus the change would require extensive 
backward compatibility testing. 

- Ludek

Former Member
0 Kudos

Hello Ludek,

The errors have seem to have gone away and I have a Crystal Report file that is working. However there are several other Crystal Reports that are not working on the web server for reasons that are unknown. The reports are being exported to PDF using exporttohttpresponse. The browser just hangs when trying to export and there are no logs that I can find in the Event Viewer on the server. Is there any place where Crystal Reports will spit out a log file that I can view?

It is also worth mentioning that RPTs are being generated in the C:\Windows\Temp folder as well as .rptConMgrCache files but still the PDF is not exported (and the files are not being deleted despite having a .Close() and .Dispose() method used in Page_Unload()). I have tried putting a try/catch block around the exporttohttpresponse but that has yielded no results.

Thanks

Edited by: travis.burgess on Feb 13, 2012 8:24 PM

Edited by: travis.burgess on Feb 13, 2012 10:06 PM

former_member183750
Active Contributor
0 Kudos

Hello Travis

No logging. But I'd create new small win app. Use as simple a repot as you can. The code would be simply;

CrystalReportViewer.ReportSource = <path to report>.

Throw the exe on the sever. let the report prompt for what ever it needs. See what it does. If the win app works replicate the above with a web app.

- Ludek

Former Member
0 Kudos

Hello, we have quite similar problems:

we run a server application (C# / WCF) that (among others) creates and streams PDF files based on CR templates under WinServer2003 32-bit / IIS 6.0 / .NET 2.0 successfully

Now we updated the server to WinServer2008 R2 64-bit / IIS 7.5 / .NET 4.0 - the server application (WCF Service / DB access) is up and running but the PDF export from CR does NOT work (details below)

We use 2 CR DLLs in Version 12.0.2000.683 (CR 2008) in the application

CrystalDecisions.CrystalReports.Engine.dll

CrystalDecisions.Shared.dll

We installed CR2008_SP4_Runtime_mlb.msi on the server (is this compatible with 12.0.2000.683 (CR 2008)?

While the application is running on my developer machine from the debugger (without IIS), it does not work within IIS 7.5 (all the rights to C:\Windows\Temp and the template directories have been granted to the local IUSR.

As you proposed in this thread, we tried to perform regsvr32 on "clientdoc.dll" but got the same error:

Error: "The module "clientdoc.dll" was loaded but the call to DllRegisterServer failed with error code 0x80070005."

As you proposed in this thread, we looked for "cryptocme2.dll" and found an older version in AdobeReader9.

We renamed it in Reader9, copied the CR "cryptocme2.dll" AND "cryptocme2.sig" and rebooted the server

-> AdobeReader9 is still running, the error in pdf creation persists!

Can you help us further?

Code:

// init the report document

ReportDocument reportDocument = new ReportDocument();

reportDocument.Load(aReportTemplatePath);

reportDocument.Database.Tables[0].ApplyLogOnInfo(crLogonInfo);

// fill all the parameter fields

foreach(ParameterFieldDefinition def in reportDocument.DataDefinition.ParameterFields)

{

// works without error

reportDocument.SetParameterValue(def.Name, i_aKeyStringValues<i>.Value);

}

// throws an exception

reportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, aDestinationFilePath);

Exception:

Exception: System.NullReferenceException

Message: Object reference not set to an instance of an object.

Source: CrystalDecisions.CrystalReports.Engine

at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)

at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options)

at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType)

at LfwServiceImplementation.CrystalReportCreator.SaveReport(String i_aRelativeTemplatePathAndName,

KeyStringValueDTO[] i_aKeyStringValues, KeyIntValueDTO[] i_aKeyIntValues,

KeyDateValueDTO[] i_aKeyDateValues, String i_aFilename)

Information:

When I check CrystalDecisions.CrystalReports.Engine.dll with the Dependency Walker:

On my developer machine, only one DLL is not found:

IESHIMS.dll

On the Win2008R2 server, five DLLs are not found:

IESHIMS.dll

MF.dll

MFPLAT.dll

MFREADWRITE.dll

WLANAPI.dll

former_member183750
Active Contributor
0 Kudos

Download [Depends|http://www.dependencywalker.com/], open the clientdoc.dll in Depends and look for reported missing dependencies.

Download [Modules|https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip] and compare the runtime on the computer that works to the one where the app fails. In particular look at the cryptocme2.dll - but not exclusively. E.g.; look for other CR runtime differences.

Download [Process Monitor|http://technet.microsoft.com/en-ca/sysinternals/bb896645.aspx] see if it tells you anything more than Modules and Depends.

[SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Former Member
0 Kudos

Hello Ludec,

thanks for the fast response!

"Despends" showed 2 missing DLLs on the running machine (HTKANB061) and 6 missing ones on the server (LEDB_TEST):

(BTW: this is the almost the same result as on "CrystalDecisions.CrystalReports.Engine.dll" (see above) except that on both machines, MSVCR80.DLL is missing as well on "clientdoc.dll" (see below):

HTKANB061

MSVCR80.DLL

IESHIMS.DLL

LEDB_TEST

MSVCR80.DLL

IESHIMS.DLL

MF.DLL

MFPLAT.DLL

MFREADWRITE.DLL

WLANAPI.DLL

The "cryptocme2.dll" is in none of the modules (both machines)

I have a lot of differences (IIS 7.5 / WinServer is completely different from my Win7 development machine of course)

The only suspect DLL I can find is called "cryptnet.dll", it is only present in the (running) HTKANB061

It disturbs me that I can't find any CR related DLLs in the listing not even "CrystalDecisions.CrystalReports.Engine.dll" or "CrystalDecisions.Shared.dll"

Do you have an E-Mail where I can send you the "Modules" Result and Differences files or does "cryptnet.dll" mean anything to you?

Thanks for your help!

Martin

former_member183750
Active Contributor
0 Kudos

Hello Martin

Unfortunately, sharing of files through the forums or email is restricted by default. E.g.; this is supposed to be reserved for phone cases. In any case, at this time I don't really think I need to see the files. You should however be able to see files loaded on the working computer. On the non working computer, it may very well be that the error occurs before those files have been loaded (quite likely actually).

One thing that strikes me re. the missing dependencies reported by Depends; MSVCR80.DLL

This may be due to missing VC++ dependencies. Please see [this|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533343334333733303338%7D.do] Kb for details.

Alternatively, perhaps as a test, we could use the MSI file to install the CR runtime as that will install all the dependencies. The MSI can be downloaded from here:

https://smpdl.sap-ag.de/~sapidp/012002523100008782532011E/cr2008sp4_redist.zip

- Ludek

Former Member
0 Kudos

Hello Ludek,

thank you for the response, here is what I found out:

1.

Please note that Depends shows MSVCR80.DLL as missing on BOTH machines

However, I installed vcredist_x86.exe and its security update on the Server

but MSVCR80.DLL is still indicated as missing (also after a system restart)

2.

As I wrote in my FIRST post, I installed CR2008_SP4_Runtime_mlb.msi on the Server

However, I installed CRRuntime_32bit_13_0.msi and CRRuntime_64bit_13_0.msi

on the Server but the PDF ist not exported (same exception, also after restart)

3.

Perhaps I have to give you some more information about the BASICS:

I did NOT have a "class factory 80000003 error" but I have the same problem

of not beeing able to use reportDocument.ExportToDisk(...) function of CR 2008

while the code is executed without errors in reportDocument.SetParameterValue(...)

Is the CR2008 runtime sufficient to handle the PDF export?

Which part of CR is "responsible" of exporting a report as PDF to the Disk?

Can we get any usefull information from the stack trace of the Exception?

The stack trace is given AFTER the code snipped in my first post

Thank you for your attention and your help,

Martin

former_member183750
Active Contributor
0 Kudos

Hello Martin

Since you are not getting the same error, but a similar symptom, the issue will not be the same. As part of the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement], we ask that different errors / symptoms / issues are placed into distinct forum threads. makes things much more searchable for other following in our footsteps.

A request: please create a new thread, detailing the symptom, noting the version of CR, .NET, etc.,etc. A quick answer to your query; no additional runtime needed to do the export.

- Ludek

Former Member
0 Kudos

Hello Ludek,

thank you - I posted my problem in a new thread http://scn.sap.com/thread/3143681 two days ago but got no answers so far.

Could you have a look at it? - That would be great!

Kind regards,

Martin

former_member183750
Active Contributor
0 Kudos

reason it was not answered is that the query was posted to the Crystal reports (design) "discussion forum". I moved it to the SAP Crystal Reports, version for Visual Studio forum now and will get to it in a minute. This move to the new platform has it's pain points. Where to put the queries is one of those pain points (it's quite confusing), but we are working on making these more clear.

- Ludek

Answers (0)