Results 1 to 2 of 2

Thread: Report Blank

  1. #1
    Join Date
    Apr 2004
    Location
    in a mug..
    Posts
    15

    Unanswered: Report Blank

    I am puzzled by this.

    My program generates the report fine on the first round, but shows blank report on the second try.. and all subsequent ones. All data are not shown except the drawn lines and title texts.

    However, the details of the report will show when i click on the refresh button.

    Now this is even stranger... it is all working on my PC, but not on a clean and fast machine. Any help is welcome.

    Here's the code:

    #######################

    Option Explicit
    Option Compare Text
    Dim Report As New rpt_Sale_Top10_Sales

    Private Sub CRViewer1_DownloadFinished(ByVal loadingType As CRVIEWERLibCtl.CRLoadingType)
    Unload frm_Wait
    Me.Enabled = True
    DoEvents
    End Sub

    Private Sub Form_Load()
    On Error GoTo ErrReport

    Me.Enabled = False

    Me.WindowState = vbMaximized

    Load frm_Wait
    frm_Wait.Visible = True
    frm_Wait.lbl_Wait_Status.Caption = "Loading and Generating Report. Please Wait..."
    frm_Wait.pic_NoProgressBar.Visible = True

    DoEvents

    Set Report = New rpt_Sale_Top10_Sales

    Report.SelectPrinter Printer.DriverName, str_ReportPrinter, Printer.Port
    Report.PaperOrientation = crPortrait
    Report.PaperSize = crPaperA4

    CRViewer1.ReportSource = Report
    CRViewer1.ViewReport

    End Sub

    Private Sub Form_Resize()
    CRViewer1.Top = 0
    CRViewer1.Left = 0
    CRViewer1.Height = ScaleHeight
    CRViewer1.Width = ScaleWidth
    Me.WindowState = vbMaximized
    End Sub

    Private Sub Form_Unload(Cancel As Integer)
    Unload frm_Sale_Top10_Select
    Set Report = Nothing
    frm_Sale_Top10.Visible = True
    frm_Sale_Top10.MSFlexGrid1.Rows = 1
    frm_Sale_Top10.cmd_Print.Enabled = False
    frm_Sale_Top10.txt_Title.Text = ""
    frm_Sale_Top10.cmd_Cancel.SetFocus
    End Sub

    #######################
    Not all who wander are lost, except maybe Waldo.

  2. #2
    Join Date
    Apr 2004
    Location
    in a mug..
    Posts
    15
    It was a legacy project running on DAO 3.51 and reccently upgraded the reporting from CR7 to Crystal Report 8.5. Hence CR uses MS DAO for connection.

    All the reports are .DSR in the Project. I.e. rpt_Sale_Top10.Dsr and any changes i need to do are done in VB.

    CRViewer1 will call upon rpt_Sale_Top10.

    I would try any ideas at this moment. thanks.
    Not all who wander are lost, except maybe Waldo.

Posting Permissions

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