cancel
Showing results for 
Search instead for 
Did you mean: 

C:\SC\crviewer.dll could not be loaded

Former Member
0 Kudos

Moved application source code from laptop to new desktop. Crystal Reports XI SP2 is installed on new desktop. When I open VB6 project, I get message "c:\sc\crviewer.dll could not be loaded -- Continue loading projects?" This application worked on my laptop. I no longer have the laptop. Need help to resolve references. Other messages I get are: "Errors during load. Refer to c:\SC\frmViewReport.log for details." and "Errors occured during load." When I run the application, I get "Compiler error: Method or data member not found"

In frmViewReport.log I have the following line:

Line 66: Class CRVIEWERLibCtl.CRViewer of control crvReport was not a loaded control class.

Steps for Reconstruction

1. Open VB6

2. Select project to open

3. See error "c:\sc\crviewer.dll could not be loaded -- Continue

loading projects?"

Operating System: Windows XP

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

"Errors during load. Refer to c:\SC\frmViewReport.log for details."

- What does the log say?

I'd also recommend the Process Monitor utility to see where things are failing. ProcMon can be downloaded from here:

http://technet.microsoft.com/en-ca/sysinternals/bb896645.aspx

Ludek

Former Member
0 Kudos

Hi Ludek,

The original post shows the c:\SC\frmViewReport.log says:

Line 66: Class CRVIEWERLibCtl.CRViewer of control crvReport was not a loaded control class.

Does that help?

Thanks,

Sean

former_member183750
Active Contributor
0 Kudos

Not really. See what ProcMon logs say.

Ludek

Former Member
0 Kudos

Thanks for your help. I looked at ProcMon. It showed RegOpenKey for several HKCR\TypeLib which said NAME NOT FOUND. I have crviewer.dll in 2 directories on my system. The one that I believe is correct is C:\Program Files\Common Files\Business Objects\3.0\crystalreportviewers11\ActiveXControls. The other is in a distribution directory from an install package I made a long time ago when we were using Crystal 8.5.

Just for fun I copied crviewer.dll from the application install package bck when I was using Crystal Reports 8.5 to c:\sc\. I ran the application and was able to access report functionality and did not get the errors while loading the VB project. So it is working, but this brings up several concerns. First will executables I create run on the end users computers? Second, in Crystal Reports XI, do I even need to have crviewer.dll? Is there a different activeX control in Crystal Reports XI that replaces the need for crviewer.dll? Third, why does the crviewer from Crystal Reports 8.5 solve the problem? Are the VB6 project references really the root cause. Forth, is there some sort of problem that causes my application not to find the crviewer.dll in C:\Program Files\Common Files\Business Objects\3.0\crystalreportviewers11\ActiveXControls? Is the DLL not correctly registered?

former_member183750
Active Contributor
0 Kudos

First will executables I create run on the end users computers?

- yes they will. But we need to be clear on what version of the runtime is the app using. CR 8.5, or CR XI? (more on that later)

Second, in Crystal Reports XI, do I even need to have crviewer.dll?

- absolutely - if you are using the RDC. There are two core components to the RDC; the craxdrt.dll and the crviewer.dll

Is there a different activeX control in Crystal Reports XI that replaces the need for crviewer.dll?

- no there is not

Third, why does the crviewer from Crystal Reports 8.5 solve the problem?

- most likely because there is a reference to that version of the viewer in the project. Go to Project menu, references and see what the projects is referencing.

Are the VB6 project references really the root cause.

- absolutely

Forth, is there some sort of problem that causes my application not to find the crviewer.dll in C:\Program Files\Common Files\Business Objects\3.0\crystalreportviewers11\ActiveXControls?

- yup. the CR XI components are not being referenced in the app. Again, go to Project, references. The two references for CR XI are; crystal ActiveX Report Viewer Library 11.0 and Crystal Reports ActiveX Designer Runtime Library 11.0. I'll bet my bottom dollar that these are not the referenced dlls...

Is the DLL not correctly registered?

- nothing to do with registering. I'm quite sure you'd be getting different errors.

Now, back to question 1. To determine the runtime your app is actually using, I recommend you use the modules utility from here:

https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip

Run, your app, then start modules, get a log created. Expand the "by process" node, select your app exe. Then go to the View menu and select Details. See what CR dlls are loading. I'm sure it will all be version 8.5

Ludek

Former Member
0 Kudos

Hi Ludek,

Thanks for all your help! I guess what happened on my laptop is that I had Crystal Reports 8.5 on it when I upgraded to Crystal Reports XI. I thought I had switched all the references in my VB project, but had not. When I moved the code to a different machine, I no longer had the Crystal Reports 8.5 components. It created a chicken and egg scenario in that I could not remove the old references because they were still being referenced. I ended up hand editing the VB project file and the form file. Before I edited the file I created a temp form that referenced the Crystal Reports XI RDC. I used the temp form to identify the changes needed to the frmReportView.frm file. I saved the files in note pad and then entered VB6 again. This time everything worked and the junk references were gone.

Thanks,

Sean

former_member183750
Active Contributor
0 Kudos

Good to hear all's well :).

Ludek

Answers (0)