cancel
Showing results for 
Search instead for 
Did you mean: 

Error with Crystal Reports/VS2010

Former Member
0 Kudos

I've got a user that is getting the following error when trying to view a report from a .NET desktop application...the type initializer for 'crystaldecisions.crystalreports.engine.reportdocument' threw an exception

I've installed the runtime engine from here Link: [http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp] and also tried adding the merge module into the setup package for the application. I'm still seeing the same error. What else needs to be installed for the reports to work with VS2010?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

That should be it as far as the runtime is concerned.

From your description I take it you used the MSI(?) - pleae confirm, which should also have all the dependencies (VC++ and ATL libraries).

A few questions:

What OS is this happening on?

Is this a 32 bit or a 64 bit app?

At the time of the error, are you viewing, printing or exporting? (If printing / exporting are you using the viewer buttons or code?)

Do you get the issue with all reports?

Can you reproduce the error on your development computer?

Can you reproduce the error on other computers?

- Ludek

Former Member
0 Kudos

Yes I used an MSI to install the application and merge module.

This is on a 32bit Windows 7 machine.

Tried compiling/installing the app as x86, .Net 3.5 and also 4.0

The error shows when trying to view the report

The app only uses 2 reports, but errors on both

I cannot reproduce on my dev box, it works fine for me...typical

I haven't been able to track down another 32 bit Win7 box to test with

A little more history...

This same msi was used to install the app on XP boxes and the app worked fine. At the time, Beta 2 of the runtime files was all that was available so that's what I used.

One user has recently switched to Win7 and after installing the app, the initial error was that crpe32.dll could not be found, even though it was in the exact directory listed in the error message. Using Add/Remove Programs would not uninstall the runtime, so we followed the steps listed in the last post here Link: [;. That uninstalled the runtime so we could install the latest version of the runtime. Now we get the error listed in my initial post.

thanks!

former_member183750
Active Contributor
0 Kudos

The Beta "stuff" worries me. We had a sticky post warning against installing Beta on any production system...

In my experience, Beta 2 runtime uninstall clean. Beta 1 does not.

In addition to the steps in the referenced thread, make sure you delete any CR directory. E.g.; c:\program files(x86)\SAP BusinessObjects

Then reinstall the release runtime.

- Ludek

Former Member
0 Kudos

We deleted that SAP folder as well. It must have uninstalled ok because we were able to install the latest version (SAP Crystal Reports runtime engine for .NET Framework 4 (32-bit)) from here Link: [http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp]

We also tried uninstalling the runtime again after doing the manual uninstall, this time it was successfully removed using Add/Remove Programs. But still get the same error after reinstalling.

thanks!

former_member183750
Active Contributor
0 Kudos

See if [Process Monitor|http://technet.microsoft.com/en-ca/sysinternals/bb896645.aspx] tells you anything. Any "Access Denied" error messages, what happens when the assembly is attempted to be loaded, etc. Also, look for any attempts at loading of version 14.x dlls and or assemblies.

You may also try [Modules|https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip] to compare the dev box to this box, but I suspect on the box that gives the error, you will not see too many CR dlls loaded.

Oh - one more thing. Seeing as you were possibly originally using the Beta 1 runtime. You must have created an app.config

file to do the rediretc to version 12 assemblies. Has this file been removed?

Ludek

Edited by: Ludek Uher on Dec 31, 2010 6:15 AM

Former Member
0 Kudos

Tried ProcMon...no Access Denied messages. It is loading assembly version 14.0.2000.0.

I was using Beta 2 I believe, so I did not use an app.config entry to redirect to version 12 assemblies. I believe it was using version 14?

thanks!

former_member183750
Active Contributor
0 Kudos

Right;

It is loading assembly version 14.0.2000.0.

This should not be happening. You want to be loading version 13.x files. Version 14 should not be available at all. You'll need to ensure your app does not reference any version 14 assemblies. You must ensure the computer is clean of any version 14 dlls / assemblies, etc. If uninstall of the Beta 2 did not clean that off for you, you will have to do it manually, including the GAC.

Ludek

Former Member
0 Kudos

Got it working

I forgot I had the Beta 2 version of CR for VS2010 so I uninstalled that and installed the latest release, then created a new setup package (which included the v13 merge module). After uninstalling the v14 assemblies from the user pc, we reinstalled the latest version of the application. Now we were back to the original error, could not find crpe32.dll. We reinstalled the runtime engine from http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp and the reports started working.

Why the merge module doesn't work though is a mystery?

Ludek, thank you very much for the help!!

former_member183750
Active Contributor
0 Kudos

The MSM is for runtime only. I suspect that there are "hooks" into the VS2010 IDE that the msm / msi is missing so you have to run the crvs2010 install (http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0.exe) (?).

The good news is that it is working

Hava a great day

Ludek

Answers (0)