I'm a newbie to crystal reports, who has been told by an evil boss that I must produce two crystal reports / vb interfaces for a distributed system with 20+ users by monday morning
I've managed to cobble together some code to load a report and print it. This works fine the first time, but comes up with a "Memory Full" error the SECOND time report is loaded.
I've attached the code below. Anyone got any ideas?
Private Sub cmdLoad_Click()
CRViewer.DisplayBorder = False 'MAKES REPORT FILL ENTIRE FORM
CRViewer.DisplayTabs = False 'THIS REPORT DOES NOT DRILL DOWN, NOT NEEDED
CRViewer.EnableDrillDown = False 'REPORT DOES NOT SUPPORT DRILL-DOWN
CRViewer.EnableRefreshButton = False 'ADO RECORDSET WILL NOT CHANGE, NOT NEEDED
Set crystal = New CRAXDRT.Application 'MANAGES REPORTS
Set report = crystal.OpenReport(App.Path & "\Shipping Manifest (Container Sequence).rpt" 'OPEN OUR REPORT
report.DiscardSavedData 'CLEARS REPORT
report.Database.Verify
report.ParameterFields(1).ClearCurrentValueAndRange 'Set up a parameter
report.ParameterFields(1).AddCurrentValue "V00001"
CRViewer.ReportSource = report 'LINK VIEWER TO REPORT
CRViewer.ViewReport 'SHOW REPORT << Fails here
Do While CRViewer.IsBusy 'ZOOM METHOD DOES NOT WORK WHILE
DoEvents 'REPORT IS LOADING, SO WE MUST PAUSE
Loop 'WHILE REPORT LOADS.
CRViewer.Zoom 94
End Sub
I've managed to cobble together some code to load a report and print it. This works fine the first time, but comes up with a "Memory Full" error the SECOND time report is loaded.
I've attached the code below. Anyone got any ideas?
Private Sub cmdLoad_Click()
CRViewer.DisplayBorder = False 'MAKES REPORT FILL ENTIRE FORM
CRViewer.DisplayTabs = False 'THIS REPORT DOES NOT DRILL DOWN, NOT NEEDED
CRViewer.EnableDrillDown = False 'REPORT DOES NOT SUPPORT DRILL-DOWN
CRViewer.EnableRefreshButton = False 'ADO RECORDSET WILL NOT CHANGE, NOT NEEDED
Set crystal = New CRAXDRT.Application 'MANAGES REPORTS
Set report = crystal.OpenReport(App.Path & "\Shipping Manifest (Container Sequence).rpt" 'OPEN OUR REPORT
report.DiscardSavedData 'CLEARS REPORT
report.Database.Verify
report.ParameterFields(1).ClearCurrentValueAndRange 'Set up a parameter
report.ParameterFields(1).AddCurrentValue "V00001"
CRViewer.ReportSource = report 'LINK VIEWER TO REPORT
CRViewer.ViewReport 'SHOW REPORT << Fails here
Do While CRViewer.IsBusy 'ZOOM METHOD DOES NOT WORK WHILE
DoEvents 'REPORT IS LOADING, SO WE MUST PAUSE
Loop 'WHILE REPORT LOADS.
CRViewer.Zoom 94
End Sub