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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Declaring new crystal report1 in vb

Status
Not open for further replies.

Sinead

Programmer
Aug 3, 2001
14
IE
In the developers guide for Crystal Reports it says...
Dim report As New CrystalReport1
CRViewer1.ReportSource = report
CRViewer1.ViewReport


The CrystalReport1 object gives an error saying that the 'User Defined Type is not defined'. I have 2 controls on the form. 1 is the crviewer and the other is the crystal report control (this is hooked up to a report that I previously created). I have added the reference 'Crystal Reports 8.5 ActiveX Designer Design and Runtime Library'.

How do I define CrystalReport1?
 
You're using the OCX in your VB form. The code example is for the RDC.

In your code example, CrystalReport1 is the name of the Crystal Report designer file (.DSR). You create a designer file in Crystal V7/V8 by adding a Crystal Report inside of the Visual Basic environment.

After you have done that, in your Project window, you have VB forms, VB classes, VB modules, and Designers. Brian J. Alves
Email: brian.alves@worldnet.att.net
VB / ASP / Crystal / SQLServer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top