I have a small VB application with CrystalReports integration. The source I was given fails to compile for a missing reference and the debugger highlights the first line here:
Code:
Dim Report As New CrystalReport1
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
CRViewer91.ReportSource = Report
Report.DiscardSavedData
CRViewer91.ViewReport
Screen.MousePointer = vbDefault
End Sub
Private Sub Form_Resize()
CRViewer91.Top = 0
CRViewer91.Left = 0
CRViewer91.Height = ScaleHeight
CRViewer91.Width = ScaleWidth
End Sub
I removed the missing reference, commented out the offending Dim, and then added new Dims. The resulting code looks like this:
Code:
'Dim Report As New CrystalReport1
Dim crystal As New CRAXDRT.Application
Dim Report As New CRAXDRT.Report
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
CRViewer91.ReportSource = Report
Report.DiscardSavedData
CRViewer91.ViewReport
Screen.MousePointer = vbDefault
End Sub
Private Sub Form_Resize()
CRViewer91.Top = 0
CRViewer91.Left = 0
CRViewer91.Height = ScaleHeight
CRViewer91.Width = ScaleWidth
End Sub
Then I compile this code I get the run-time error 438, "Object doesn't support this property or method." The debugger highlights this line "CRViewer91.ReportSource = Report"
Does anyone have any guidance on how I can fix this and get a working application.