cancel
Showing results for 
Search instead for 
Did you mean: 

Error has occurred while attempting to load the Crystal Reports runtim

Former Member
0 Kudos

Hi all,

I'm using VS 2008 to create a business app that uses Crystal Reports to display and print reports. I'm distributing it mostly to Win7 Pro 64 bit machines.

The program is working on ALMOST every machine, but I just installed it on a new laptop, and whenever I access the Crystal part of the program, I get the classic "Either The Crystal Reports registry key permissions are insufficient or the Crystal Reports runtime is not installed correctly".

Googling this error, the UNIVERSAL answer is "Target your VB application at x86 only." The problem is, I ALREADY DID THAT. And this program works on all my OTHER Win7 64 bit machines. It's just this one.

Can anyone help? I'm at my wits end. I've tried installing, uninstalling, installing while right-clicking and choosing Run as Admin...

Thanks,

Andy Oliner

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Oh, I forgot to mention that I'm using the Crystal Reports that's included in VS 2008, although I do also have Crystal XI installed on my personal workstation, on which I am developing.

former_member183750
Active Contributor
0 Kudos

Hello Andrew

Is the app compiled as 32 bit, 64 bit or "Any CPU"?

You may want to see if Process Monitor tells you anything useful...

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

Hi Ludek,

Thanks for your reply. The program is compiled as "Target CPU: x86" in the Advanced Compiler Settings dialog. I assume that is what you are referring to.

I don't know what I would look for in Process Monitor. As I said, most of our workstations are Windows7 Pro, 64 bit, and the Crystal part of the program works on all of them. Well, all but this one.

Andrew Oliner

former_member183750
Active Contributor
0 Kudos

OK, since we're using CR 10.5 (the VS 2008 bundle), 32 bit, we'd want to run the following MSI:

https://smpdl.sap-ag.de/~sapidp/012002523100009351332008E/CRBasicVS2008_redist_x64.zip

Now, if that was successful, you should see the following directory structure:

C:\Program Files\Business Objects\2.7\Bin

(I think... long time since I looked).

Also, in the GAC, you should see CR assemblies of version 10.5.3700.0.

As far as ProcMon, all you need to do, is filter it for your process / app name, run the app, then look in the procmon logs for things like "Access Denied", "failed to load", etc.

- Ludek

Former Member
0 Kudos

Hi Ludek,

Thanks for your reply.

1. I downloaded and installed the MSI that you linked.

2. The files appear to be in C:\Program Files\Business Objects\Common\2.8\bin. As far as I can tell, they are also in the GAC.

3. The problem still occurred, so I ran ProcMon. The last thing that ProcMon sees before the error is written to the Event Log is an attempt to read the Registry Key HKLM\SOFTWARE\Wow6432Node\Business Objects\10.5\Crystal Reports. This produces a NAME NOT FOUND. Now, this may be nothing, because I've seen in Procmon where my CLR seems to try a bunch of different paths that don't exist before it figures out where something is located. But this is the last entry before the Error Event is logged.

I checked, and this entire Registry branch does not seem to exist on this machine. According to Regedit, there is no node for "Business Objects" under the Wow6432Node. However, I checked my workstation (which is the development machine) and another Win7 64 bit workstation which is not the development machine, and both of them have this node in their registry.

So I guess the Crystal installer is not working correctly? What would you suggest I do? I guess the simplest thing would be to just export the registry branch and import it, but I'd be more comfortable actually fixing the problem.

Thanks,

Andy

former_member183750
Active Contributor
0 Kudos

Hello Andy

Strange as I have never seen this issue, but exporting / importing the registry will be worth testing.

As a BTW.; there are no fixes forthcoming for that version of CR anymore. So, if the import of the reg key works, that will have to be your work-around...

- Ludek

Former Member
0 Kudos

Okay, what I did was export the key from one of the user workstations, NOT from my development machine. The good news is that it fixed THAT problem. The bad news is that now there's a new problem.

When I tried to view a report in the Report Viewer control, I got this error:

System.TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> Sytem.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {Long GUID, I'll transcribe it if you need it} failed due to the following error: 80040154.

There's some additional stack trace detail, but I wouldn't think it would be useful. After looking up this error, it looks it's still a problem with the Runtime not installing itself properly.

I looked at this using Procmon, but I don't see anything particularly helpful this time. It seems like it is working fairly normally, then all of a sudden it starts querying registry keys about ErrorReporting, so I am guessing that at that point, it is starting to deal with the error.

Former Member
0 Kudos

Please help! Still waiting for your reply.

Former Member
0 Kudos

Okay, I did a little more work on this. For some reason, the machine that is not working has the Crystal Client under c:\Program Files, while the others have it under c:\Progam Files (x86).

Also, the machine that is not working is missing two files from the \bin directory. They are crdb_dao.dll and and sacommoncontrols.dll.

Does it matter whether the client is under x86 or not? I would guess the answer is "yes".

Former Member
0 Kudos

Okay, I found the problem. For whatever reason, Crystal requires BOTH the x86 and x64 runtimes installed. The installer program seems to try to install both, but is only successful in installing the x64 runtime. When I copied over the x86 runtime and installed it manually, that solved all of my problems.

Thank you for your brief attempt to help me, however useless it was. I am disappointed that SAP does so little to help their customers, and that the SAP website is so incredibly difficult to navigate and use. I will certainly keep all of these factors in mind as I make purchase decisions in the future.

Former Member
0 Kudos

thank you!!!

Answers (2)

Answers (2)

former_member1229785
Participant
0 Kudos

Good Job Andrew Oliner

        Your Answer working for me ... am also having same problem

Thanks

Former Member
0 Kudos

Andrew, thank you for your post.  I had the same issue and struggled on it for 2 days before stubbling on your answer.  It worked perfectly!  Thanks again.