Hi,
I'm using CR XI and VB 6 to load a report into CRViewer. The user of my app has many reports to choose from, but two summary reports take a long time (5 or 6 seconds) to load. I'd really like to show SOMETHING during this time while it's loading, but I don't know how, and I feel like I've tried everything. Here's my code so far:
Set CRApplication = New CRAXDRT.Application
Set CRReport = CRApplication.OpenReport(Rpt)
Set CRPrint = CRReport.PrintingStatus
CRReport.DisplayProgressDialog = True
frmReportViewer.Show
frmReportViewer.CRViewer.EnableProgressControl = True
frmReportViewer.CRViewer.DisplayGroupTree = False
frmReportViewer.CRViewer.EnableExportButton = True
frmReportViewer.CRViewer.Height = (frmReportViewer.Height - 200)
frmReportViewer.CRViewer.Width = (frmReportViewer.Width - 200)
frmReportViewer.CRViewer.ReportSource = CRReport
CRReport.EnableParameterPrompting = True
Select Case Rpt
Case CRPath + "Recycles.rpt"
CRReport.ParameterFields(1).ClearCurrentValueAndRange
CRReport.ParameterFields(1).AddCurrentValue LRU
Case CRPath + "Warranty.rpt"
CRReport.ParameterFields(1).ClearCurrentValueAndRange
CRReport.ParameterFields(1).AddCurrentValue LRU
Case CRPath + "MTBUR.rpt"
CRReport.ParameterFields(1).ClearCurrentValueAndRange
CRReport.ParameterFields(2).ClearCurrentValueAndRange
CRReport.ParameterFields(1).AddCurrentValue LRU
CRReport.ParameterFields(2).AddCurrentValue iRC
End Select
frmReportViewer.CRViewer.ViewReport
Do While frmReportViewer.CRViewer.IsBusy
DoEvents
Loop
...the select case code doesn't matter right now, because the summary report I'm trying to load doesn't need any parameters. At this point, all I get is a blank report screen for 5 or 6 seconds with no progress bar. I'd like to either show a progress bar or a message in the status bar of frmCoverPage (where the viewer is launched from) saying "retrieving data..." or something. Thanks in advance for the help.
I'm using CR XI and VB 6 to load a report into CRViewer. The user of my app has many reports to choose from, but two summary reports take a long time (5 or 6 seconds) to load. I'd really like to show SOMETHING during this time while it's loading, but I don't know how, and I feel like I've tried everything. Here's my code so far:
Set CRApplication = New CRAXDRT.Application
Set CRReport = CRApplication.OpenReport(Rpt)
Set CRPrint = CRReport.PrintingStatus
CRReport.DisplayProgressDialog = True
frmReportViewer.Show
frmReportViewer.CRViewer.EnableProgressControl = True
frmReportViewer.CRViewer.DisplayGroupTree = False
frmReportViewer.CRViewer.EnableExportButton = True
frmReportViewer.CRViewer.Height = (frmReportViewer.Height - 200)
frmReportViewer.CRViewer.Width = (frmReportViewer.Width - 200)
frmReportViewer.CRViewer.ReportSource = CRReport
CRReport.EnableParameterPrompting = True
Select Case Rpt
Case CRPath + "Recycles.rpt"
CRReport.ParameterFields(1).ClearCurrentValueAndRange
CRReport.ParameterFields(1).AddCurrentValue LRU
Case CRPath + "Warranty.rpt"
CRReport.ParameterFields(1).ClearCurrentValueAndRange
CRReport.ParameterFields(1).AddCurrentValue LRU
Case CRPath + "MTBUR.rpt"
CRReport.ParameterFields(1).ClearCurrentValueAndRange
CRReport.ParameterFields(2).ClearCurrentValueAndRange
CRReport.ParameterFields(1).AddCurrentValue LRU
CRReport.ParameterFields(2).AddCurrentValue iRC
End Select
frmReportViewer.CRViewer.ViewReport
Do While frmReportViewer.CRViewer.IsBusy
DoEvents
Loop
...the select case code doesn't matter right now, because the summary report I'm trying to load doesn't need any parameters. At this point, all I get is a blank report screen for 5 or 6 seconds with no progress bar. I'd like to either show a progress bar or a message in the status bar of frmCoverPage (where the viewer is launched from) saying "retrieving data..." or something. Thanks in advance for the help.