|
-
Aug 2nd, 2000, 05:53 AM
#1
Thread Starter
New Member
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.
-
Aug 2nd, 2000, 06:13 AM
#2
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
-
Aug 4th, 2000, 06:20 AM
#3
Thread Starter
New Member
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.
-
Aug 27th, 2001, 12:00 PM
#4
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|