Results 1 to 1 of 1

Thread: Any other way to Report with link Database ?

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2003
    Location
    Devron System
    Posts
    53

    Any other way to Report with link Database ?

    If any one could help me.. much thanks before hand.

    I have been assigned to "Fix and Improve" this legacy project coded by some alien....

    On and off for the past few days, i've been puzzled by the failure of refreshing the Reports with latest information. Efforts have been focused on streamlining and fix efficiency problems without causing accidental cascading collapse of the original program.

    I've tried the Report.DiscardSavedData but gave me an error. (Some Failure... ICrysatalViewer2.. or something)

    CrViewer1.Refresh in turn would tell be report has not finished loading... Of course i have unchecked the "Saved Data with Report" under file in CR in .RPT prior to importing into VB's .DSR.

    I am bummered...

    Here my project specs.
    Visual Basic 6
    Database: MS Access
    Access Method: DAO (Which i am not too familiar)
    Crystal Report 7 with .DSR files within VB project.
    Reporting uses CRViewer in a form coded as below calling for rpt_Sale.DSR in the Designer with preset database location.

    Here's my code. If anyone has an answer, please advice. But these codes say little of the problem.
    -----------------
    Option Explicit
    Dim Report As New rpt_Sale

    Private Sub CRViewer1_DownloadFinished(ByVal loadingType As CRVIEWERLibCtl.CRLoadingType)
    frm_Wait.Visible = False
    End Sub

    Private Sub Form_Load()
    DoEvents

    Me.WindowState = vbMaximized
    frm_Wait.Visible = True
    frm_Wait.lbl_Wait_Status.Caption = "Loading Data and Generating Report..."

    DoEvents

    Report.SelectPrinter Printer.DriverName, str_ReportPrinter, Printer.Port
    Report.PaperOrientation = crLandscape
    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)
    Call EnableMaintForm(True)
    End Sub
    -------------------

    Question is... are there any other method of using Crystal Report to linked to an Access Database beyond above?
    Last edited by W01fgang; Nov 26th, 2003 at 12:12 PM.

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