Save Crystal Report in VB
I get an error when I run the code below. Does anyone know what's wrong with my code. Thanks a lot!
Error message:
compile error
argument not optional
My code:
Dim Report As New CrystalReport1
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
Report.SaveAs ("C:\Documents and Settings\test.rpt")
End Sub
Private Sub Form_Resize()
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = ScaleHeight
CRViewer1.Width = ScaleWidth
End Sub