Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Blank report
Message
General information
Forum:
Visual Basic
Category:
Third party products
Title:
Miscellaneous
Thread ID:
00611681
Message ID:
00614205
Views:
28
Ok, let's get some error handling in there for you. The .Action comand is terrible in terms of error handling. Try the following instead:

Launch the report and report any errors
intResult = crptOrderPad.PrintReport

'Determine if there weere any errors
If intResult <> 0 Then
CrystalErrorReporting (intResult)
End If

Here is the code I made for CrystalErrorReporting

Public Sub CrystalErrorReporting(ByVal intResult As Integer)
'==========================================================
' Title:
' Purpose: Determine severity of error and whether to display a message
' to inform the user.
' Author: Jason P. Mahoney
' Date : Nov 27, 2001
' Parameters: intResult is the result code returned by PrintReport
'===========================================================

Dim strMessage As String

strMessage = ""

Select Case intResult
Case 20500
strMessage = "There is not enough memory available to complete the call"
Case 20507
strMessage = "There is an error in the file name you specified"
Case 20510
strMessage = "The program can't add the formula name you specified"
Case 20515
strMessage = "There is a formula error in the replacement formula text."
strMessage = strMessage & "Review the suntax and retry."
Case 20523
strMessage = "You have spcified an invalid group condition"
Case 20525
strMessage = "There is something wrong with the report you are trying to open."
Case 20527
strMessage = "Unable to connect to the Server or unable to successfullyrun the SQL query."
Case 20529
strMessage = "When printing to file or when sorting, the program requires more room"
strMessage = strMessage & "than is available on the disk."
Case 20532
strMessage = "The database DLL is corupt."
Case 20533
strMessage = "Something is wrong with the database you have specifed. You"
strMessage = strMessage & "may need to verify the database."
Case 20534
strMessage = "The database DLL is corrupt"
Case 20535
strMessage = "You have attempted to log on using incomplete"
strMessage = strMessage & "or incorrect session parameters."
Case 20536
strMessage = "You have attempted to log on using incomplete or incorrect log ojn parameters"
Case 20537
strMessage = "The table you have specified cannot be found."
Case 20540
strMessage = "The DLL required by your export call is either missing or out-of-date."
Case 20541
strMessage = "An export DLL has reported an error."
Case 20545
strMessage = "The user clicked the cancel button"
Case 20553
strMessage = "The parameter you have specified does not exist in the stored procedure,"
strMessage = strMessage & "or the value you have entered is not valid for the specified parameter."
Case 20568
strMessage = "Returned if GDI memory gets down to 10%. The program"
strMessage = strMessage & "will give this message rather than GPF."
Case 20599
strMessage = "Returned when the user passes invalid database logon information."
Case 20998
strMessage = "This error message occurs on the client computer because the charting dependency file, pg32conv.dll, was not distributed with the application"
End Select

MsgBox strMessage, vbCritical, "Issue #" & intResult


End Sub

Hopefully you can capture the error and we can narrow this thing down.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform