Results 1 to 5 of 5

Thread: [RESOLVED] VB 6/CR XI "The control is busy downloading data

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2005
    Location
    SouthEastern PA
    Posts
    39

    Resolved [RESOLVED] VB 6/CR XI "The control is busy downloading data

    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
    Last edited by SamC; Jul 14th, 2006 at 08:09 AM.

  2. #2
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Re: VB 6/CR XI "The control is busy downloading data

    Not sure why you are trying to refresh before veiwing the report but this is the code I use:

    VB Code:
    1. Set crxReport = crxApp.OpenReport(ReportName)
    2. With crView
    3.     .ReportSource = crxReport
    4.     .ViewReport
    5.     While .IsBusy
    6.         DoEvents
    7.     Wend
    8.     .Zoom "100"
    9.     .Visible = True
    10. End With

    crView is the control name.

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2005
    Location
    SouthEastern PA
    Posts
    39

    Re: VB 6/CR XI "The control is busy downloading data

    Besoup:

    This is what I have now:


    General Module:
    Public ReportPath As String
    Public craxapp As New CRAXDDRT.Application
    Public craxreport As CRAXDDRT.Report
    Public ReportName As String
    .
    .
    .
    ReportPath = "D:\Data\xxxx\Inventory"


    In the Form_Activate event of frmCRPrint, I have:
    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 =
    .
    .
    .
    End If
    craxreport.DiscardSavedData
    DoEvents
    Set craxreport = craxapp.OpenReport(ReportPath & "\" & ReportName)
    With CrystalActiveXReportViewer1
    .ReportSource = craxreport
    .ViewReport
    While .IsBusy
    DoEvents
    Wend
    .Zoom "100"
    .Visible = True
    End With
    End Sub


    On this statement: ".ReportSource = craxreport" I am now getting the following error message: 'Method ReportSource of object 'ICrystalReportViewer11 failed'.

    Do you see anything wrong with the above?
    Thanks,
    Sam

  4. #4
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Re: VB 6/CR XI "The control is busy downloading data

    hmm

    do you need your declarations to be public?

    Public craxapp As New CRAXDDRT.Application
    Public craxreport As CRAXDDRT.Report

    probably the only thing I see that I don't really do. I usually just declare them in the same sub as the code calling the report.

    Besides that I don't see anything that is really wrong...

  5. #5

    Thread Starter
    Member
    Join Date
    Mar 2005
    Location
    SouthEastern PA
    Posts
    39

    Re: VB 6/CR XI "The control is busy downloading data

    Problem Resolved: I wish I could tell you what the problem was but I have no idea except the possibility of a "bad typist" (me) or a illegal blind character. I printed that part of my code and retyped it. It worked.

    Thanks for your looks,
    Sam

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width