cancel
Showing results for 
Search instead for 
Did you mean: 

Getting 501 Error Code PE_Err_INVALIDJOBNO

Former Member
0 Kudos

Hi everyone.  This one has me puzzled.  We have a customer with our software.  They installed the software on a Citrix server system.  Our software does have dozens of crystal reports.  The reports print to the logged-in users local printer.  The local printers in use are varied. 

The report is for a work order.  When you request to print the report for 2 different work orders back-to-back, the error is displayed, but for a very small subset of users on the Citrix server.  It consistently fails for those 3 specific users.  I was thinking it could be printer-related.

I am using Delphi 7 and Crystal-11.  The user highlights 2 records from a grid, does a context menu click that says "send to printer" and that calls the Crystal engine to prepare and send to printer.  Two of the users are printing to a Minolta Bizhub.  I have not asked what printer the third one is using.

Can someone tell me what situations might trigger the error code? It might help to know what I'm looking for. 

Accepted Solutions (1)

Accepted Solutions (1)

former_member292966
Active Contributor
0 Kudos

Hi Debbie,

When the Crystal print engine creates a report object, it assigns a jobnumber to enumerate the open reports.  If you open multiple reports in the same reporting session then the jobnumbers increment until the engine is closed.  A jobnumber of 0 means there are no reports open.

If you are using Delphi I assume your application is making API calls to the engine.  Each API call requires the jobnumber so it knows which report you are working with.  The error you are getting means the print engine is being passed an invalid jobnumber.  Possibly the report object was destroyed too soon or the method that keeps track of the open reports is incrementing before a report is opened.

The only other time I've seen something similar is if the user does not have access to a printer.  In very early versions of Crystal this would cause the print engine to crash in the most awful way.  This should not be a problem with your version of Crystal.

Check to make sure those problem users can print from notepad or something.  Can your application print with just 1 work order?  If possible, can you track which call is generating the error and the jobnumber?  Does it happen on the first report or the second?

Good luck,

Brian

Answers (0)