Dim a As CRAXDRT.Application
Dim b As CRAXDRT.Report
Private Sub Form_Load()
Set a = New CRAXDRT.Application
Set b = New CRAXDRT.Report
Set b = a.OpenReport("C:Documents and SettingsAdministradorMeus documentos este_crystalReport2.rpt")
Screen.MousePointer = vbHourglass
b.DiscardSavedData
b.VerifyOnEveryPrint = True
CRViewer91.ReportSource = b
CRViewer91.ViewReport
Screen.MousePointer = vbDefault
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set oAP = Nothing
Set oRP = Nothing
End Sub
Referenciar:
Crystal Reports 9 ActiveX Designer Run Time Library
Crystal Report Viewer Control 9