# VBForums CodeBank > CodeBank - Visual Basic 6 and earlier >  Crystal Reports XI and VB6 Example

## Mark Gambo

In another forum someone asked if anyone could post an example of displaying a CR by using VB6.

If you have any questions please feel free to post them here.

----------


## classnet

Ahhh.  Just what I was looking for!

----------


## jpcatherine



----------


## abhijit

> Error Image


Do you have a reference to the reports control?

 :wave:

----------


## BLUMONKEY

> Do you have a reference to the reports control?


Im having the same problem,and cant seem to get past it.  It does have an error message when opening the project, where it says


```
Class {BD4B4E61-F7B8-11D0-964D-00A0C9273C2A} of control CrystalReport1 was not a loaded control class.
```

But regarless of reference or component, I cant seem to get it to work.  Any help is appreciated.

----------


## amitpanchal

Dear Team

I downloaded this project and try to run it but having same compile error problem .I have installed VB6 and crystal report 9 on my PC.
How to resolve this problem.which reference i should select to run this application and what are other requirement please any body let me know.

Thanks in advance
Amit Panchal

----------


## Hack

What are the exact error(s) that you are getting?

----------


## amitpanchal

Sir i am having the same compile error and at the same place which is shown in above reply in the same thread.

----------


## bholmstrom

Good afternoon,

I am just trying to fire up your sample and it gets and error at:

VB6 - Crystal Reports XI

Private Sub Form_Load()
Dim rs As ADODB.Recordset, rs2 As ADODB.Recordset
Dim strSQL As String


    WindowState = 0
    Screen.MousePointer = vbHourglass

    Set Report = New CrystalReport1
    Set rs = New ADODB.Recordset
    Set rs2 = New ADODB.Recordset

I have the Crystal ActiveX Report Viewer Library 11.5 registered as an component and is marked in the References under Project.

Any ideas why the error?

Compile Error:
User-definded type not defined.

Error is pointing at " Set Report = New CrystalReport1"

Thanks

----------

