Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to run Crystal Report from VB6

Status
Not open for further replies.

koz

Programmer
Jan 12, 2000
31
US
Class Crystal.CrystalReport of control CrystalReport1 was not a loaded control class.

I get this message when I try to run the Sample Programs from Business Objects.

I'm using VB 6 SP5, Crystal Reports 8.5 on a Windows XP-Home System.

I tried un-installing and re-installing Crystal Reports but it didn't do any good.

In my program I don't see a component for Crystal Reports just Crystal Viewer.

Any help will be greatly appreciated...
 
If you are using a crystal designer you will see it listed under the designers tab of the components pop-up. Is it possible that the version of the designer doesn't match Crystal 8.5 version that you have installed?

Another thing to look at is the references--
From the project menu item choose references and verify that Crystal Reports 9 ActiveX Designer Design and Runtime Library is checked.


 
Thanks for the thing to try.

I'm not sure if it's using a designer. How can I tell. I've downloaded the files and am trying to understand them to use crystal in one of my programs.

Also there is no Crystal Reports 9 ActiveX Designer Design and Runtime Library Is Crystal 8.5 the same thing? I added it but still get the same error.

I still can't find a component CrystalReport anywhere. Shouldn't it be in the Components list. I get the feeling something isn't install or registered properly...
 
You are right -my version of crystal reports is 9 - so the reference for you should be 8.5.

I just did a quick test and this should point out your problem.

start a new vb EXE project.
From the menu at the top called project -- drop down and choose Add Crystal Reports 8.5 -- choose the - As a blank report - radio button when you get a screen to choose the crystal gallery. Click OK

The next dialog includes the viewer form - leave both radio buttons on yes and click OK

in your project explorer you will see Crystal Report1
Open it up and just add the date field and report title in the header section- close the report then run your vb project. The report should run.
If it does - look at the references (project->references) you will see that it automatically loaded 3 for you. Try adding those in your existing project.




 
After I started the new project and selected Project the only choices I saw in the dropdownlist were:

Add Form
Add MDI Form
Add Class Module
Add User Control
Add Property Page
Add Document (Grayed out)
Add Data Environment
Add File
--------------------
Remove Form1
--------------------
References
Components
--------------------
Project1 Properties

Does this make any sense?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top