Results 1 to 4 of 4

Thread: DESPERATE : VB 5 SP3 and Crystal Reports

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Location
    Cardiff
    Posts
    5

    Angry

    I am using Visual Basic 5.0 Professional Service Pack 3 and Crystal Reports 6. I have a problem when running reports @ runtime from the user PC's. It is an intermittent problem, when running the reports they receive an Automation Error - 2147417848 (80010108) - there is nothing special about the report - it just accesses an Access database stored on the main server. What could be causing this, I have looked on http://www.sagesoftware.com and their technical support but I have not yet found a solution to the problem. I am fairly new to programming VB with Crystal Reports - is there any way of trapping these errors so instead of the program "bombing out" it will only crash the report. The users are getting very frustrated with the application and it frustrates me further because I cannot fix the problem :-(

    Please can anyone help me???

    Extra information – below is the code I have used to try and trap the error, the program however still crashes and I can’t see what the report is crashing on :-(

    If testAE <> "" And IsNumeric(testAE) <> False Then
    DoEvents
    frmPrintReports.CRPrintAEForm.SelectionFormula = "{AE.AENO} = '" + testAE + "'"

    frmPrintReports.CRPrintAEForm.WindowTitle = "Print AE Form"

    Result% = frmPrintReports.CRPrintAEForm.PrintReport
    If Result <> 0 Then
    MsgBox ("Last Error No. : " + Str
    (frmPrintReports.CRPrintAEForm.LastErrorNumber) + " /
    Last Error String : " +
    frmPrintReports.CRPrintAEForm.LastErrorString)
    End If

    DoEvents
    Else
    MsgBox ("Please re-load this AE No.")
    End If

    In references the order is set to: -

    OLE Automation
    Microsoft DAO 2.5/3.5 Compatibility Library
    Crystal Report Control 4.6

    I look forward to hearing any advice.

  2. #2
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ....

    It's been a lot of time since I used VB5 with CR, but just would like to help.

    Try if your code works with a local copy of the Access database. If it works, there may be some error with the data accessing code in your app.

    Instead of the crude method you have followed to trap any errors, use the 'On Error' statement.

    Code:
    Private Sub <Procedure Name>()
    
    On Error Goto MyError
    
    'Your code goes here
    '
    '
    '
    
    
    MyError:  'Remember, this word should appear to the extreme left.
    If Err.Number <> 0 Then
       MsgBox "An error has occurred."
       Exit Sub
    Else
       Resume Next
    Endif
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Location
    Cardiff
    Posts
    5

    Angry

    Thanks for the code, my application doesn't completely crash out anymore. The automation error -2147417848 is shown with an OK button. I can press OK and then if I try and use the same report again it gives the same error message. Do I need to close the report down after every use???

    I look forward to hearing from you.

  4. #4
    Lively Member
    Join Date
    Aug 2001
    Posts
    83

    Run-time error 2147417848

    Stevejo,

    Did you ever figure out a resotion to this error? I am experiencing the same problem and would appreciate any help greatly:-)

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