sweetie
May 10th, 2006, 02:24 PM
Hi,
I have one command "cmdprint" on a form and "CrystalActiveXReportViewer1" and "Report1.rpt". I have written the code like below:
Private Sub CrystalActiveXReportViewer1_CloseButtonClicked(UseDefault As Boolean)
Cr.ReportFileName = "Report1.rpt"
Cr.Action = 1
End Sub
Private Sub cmdprint_click()
Cr.ReportFileName = App.Path & "Report1.rpt"
Cr.DiscardSavedData = True
Cr.Action = 1
Cr.PageZoom (85)
End Sub
When I try to click on cmdprint button ...It shows error : "Object required" and points to the followine line:
"Cr.ReportFileName = App.Path & "Report1.rpt"
I am using crystal reports XI
Please help.
I have one command "cmdprint" on a form and "CrystalActiveXReportViewer1" and "Report1.rpt". I have written the code like below:
Private Sub CrystalActiveXReportViewer1_CloseButtonClicked(UseDefault As Boolean)
Cr.ReportFileName = "Report1.rpt"
Cr.Action = 1
End Sub
Private Sub cmdprint_click()
Cr.ReportFileName = App.Path & "Report1.rpt"
Cr.DiscardSavedData = True
Cr.Action = 1
Cr.PageZoom (85)
End Sub
When I try to click on cmdprint button ...It shows error : "Object required" and points to the followine line:
"Cr.ReportFileName = App.Path & "Report1.rpt"
I am using crystal reports XI
Please help.