Discussion Locked

Connecting Crystal Reports 8.5 from VB

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How do i connect and use crystal reports vs 8.5 from visual basic 6.0 applications.

1 reply

by miss kitty

In your vb project, you need to add Crystal reports in your components area; then you need to add a Crystal report control and,if you are going to have the user use the viewer, a Crystal Viewer Control. On the form that you will use to call in the crystal report, here is an example of the code that you need to add:

Dim crxApplication As New CRAXDRT.Application
Public Report As CRAXDRT.Report
Dim crxDatabaseTable As CRAXDRT.DatabaseTable
Dim crxParameterField As CRAXDRT.ParameterFieldDefinition
Dim crxFormulaField As CRAXDRT.FormulaFieldDefinition
Set Report = crxApplication.OpenReport _
("E:\PLTERA\CRYSTAL REPORTS\HAULER REPORTS\Contract Haulers Report.rpt", 1)
frmViewer.Show vbModal

This should be enough to get you started.
Cathy

This discussion is closed to new replies.