Results 1 to 1 of 1

Thread: CRViewer1 crashes VB?!?! (Resolved)

  1. #1

    Thread Starter
    Fanatic Member Avatarp's Avatar
    Join Date
    Sep 2002
    Location
    Calgary
    Posts
    826

    CRViewer1 crashes VB?!?! (Resolved)

    I have a couple reports in my application and they are all the same programatically. However one report crashes VB Studio 6.0.

    Code:
    Dim Report As New CRSalesMonthly
    
    Private Sub Form_Load()
    On Error GoTo MyErrorTrap:
    
        Me.WindowState = vbMaximized
    
        ' Add the datasource to the report
        Set Report = Nothing
        Set Report = New CRSalesMonthly
    
        'sets the database password enabling the report to connect
        Report.Database.Tables(1).SetSessionInfo "", Chr(10) & HSODBpswrd
        'Sets the location for the first table in the report to the Access database.  If the report has
        'more than one table the same location will propagate through all of the tables.
        'You can set a new location for each table individually based on it's index in the Tables collection.
        Report.Database.Tables(1).Location = HSODBPathAndName
    
        Screen.MousePointer = vbHourglass
        CRViewer1.ReportSource = Report
        CRViewer1.ViewReport
        Screen.MousePointer = vbDefault
        Exit Sub
    MyErrorTrap:
        MsgBox Err.Description, vbOKOnly
    End Sub

    It crashes at CRViewer1.ViewReport

    stepping through the code shows me that the password is correct as well as the DB location.

    Strange....

    Any ideas?
    Last edited by Avatarp; Oct 26th, 2004 at 06:46 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