SamC
Jul 14th, 2006, 07:44 AM
OS =Windows XP Professional SP2
CR version XI Developer Edition
VB6 Enterprise Edition
I have a Form called: frmCRPrint. This is where the CrystalActiveXReportViewer is on.
I am getting the following error when executing the code below.
"The control is busy downloading data"
The table I am using (Table Name: TAKEOUT) only has 10 records in it so I don't understand what is causing this problem. The variable "TOSpecDate" is initialized prior to entering this routine.
Global Module:
Public ReportPath As String
Public craxapp As New CRAXDDRT.Application
Public craxreport As CRAXDDRT.Report
Public ReportName As String
In the Form_Activate of frmCRViewer, I have the following:
Private Sub Form_Activate()
Dim dbTable As CRAXDDRT.DatabaseTable
If ReportName = "InvTakeOut.rpt" And HoldIndex = 0 Then
Set craxreport = craxapp.OpenReport(ReportPath & "\" & ReportName)
craxreport.FormulaSyntax = crCrystalSyntaxFormula
craxreport.RecordSelectionFormula = "{TakeOut.dbToDate} = '" & TOSpecDate & "'"
ElseIf ReportName = "InvPartStatusReport.rpt" Then
.
.
End if
craxreport.DiscardSavedData
> While CrystalActiveXReportViewer1.IsBusy
DoEvents
Wend
> CrystalActiveXReportViewer1.Refresh
> CrystalActiveXReportViewer1.ReportSource = craxreport
> CrystalActiveXReportViewer1.ViewReport
> Set craxreport = Nothing
> End Sub
>
> The error occurs on the "CrystalActiveXReportViewer1.Refresh" command. I let this code run for about 10 minutes. No report was seen.
An early thank you for trying to help.
Sam
CR version XI Developer Edition
VB6 Enterprise Edition
I have a Form called: frmCRPrint. This is where the CrystalActiveXReportViewer is on.
I am getting the following error when executing the code below.
"The control is busy downloading data"
The table I am using (Table Name: TAKEOUT) only has 10 records in it so I don't understand what is causing this problem. The variable "TOSpecDate" is initialized prior to entering this routine.
Global Module:
Public ReportPath As String
Public craxapp As New CRAXDDRT.Application
Public craxreport As CRAXDDRT.Report
Public ReportName As String
In the Form_Activate of frmCRViewer, I have the following:
Private Sub Form_Activate()
Dim dbTable As CRAXDDRT.DatabaseTable
If ReportName = "InvTakeOut.rpt" And HoldIndex = 0 Then
Set craxreport = craxapp.OpenReport(ReportPath & "\" & ReportName)
craxreport.FormulaSyntax = crCrystalSyntaxFormula
craxreport.RecordSelectionFormula = "{TakeOut.dbToDate} = '" & TOSpecDate & "'"
ElseIf ReportName = "InvPartStatusReport.rpt" Then
.
.
End if
craxreport.DiscardSavedData
> While CrystalActiveXReportViewer1.IsBusy
DoEvents
Wend
> CrystalActiveXReportViewer1.Refresh
> CrystalActiveXReportViewer1.ReportSource = craxreport
> CrystalActiveXReportViewer1.ViewReport
> Set craxreport = Nothing
> End Sub
>
> The error occurs on the "CrystalActiveXReportViewer1.Refresh" command. I let this code run for about 10 minutes. No report was seen.
An early thank you for trying to help.
Sam