sneha Level: Scholar
 Registered: 28-03-2006 Posts: 29
|
How to start coding to take printout?
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.
____________________________
Sneha
|