1. Ronnie Po
  2. PowerBuilder
  3. Friday, 23 April 2021 23:22 PM UTC

A strange new issue has come up since I migrated to PB 2019 R3. Unfortunately for me, two customers discovered this in production after I upgraded their applications.


It seems that the DataWindow Print() method fails with certain printer/driver combinations.
When printing a DW for the first time, the following printer notification from Windows pops up:

"Error printing on <printer name>

The printer couldn't print"

(screen capture. don't know if this will show)

Subsequent calls to Print() produce this notification:

"Printer is in an error state"

The print queue looks like this:

Here are additional details that may be useful:

 - in one office with about 5-6 printers of various makes and models, this occurred with one printer but not others

 - in another office with 20+ printers of various makes and models, this occurred with three printers

 - these are the specific printers (so far) that I've found to have issues:

Lexmark MS410 Series XL
HP Color LaserJet M454
HP Color LaserJet M255dw

 - in one case (that I tried), replacing the manufacturer-supplied driver with a generic driver fixed the issue (but of course removed various printer-specific features from the user)

 - the issue occurs with both runtime 19.2.0.2670 and 19.2.0.2703

 - the issues does NOT occur with PB 2019 R2

 - I was able to reproduce the issue in development with my HP Color LaserJet M255dw (lucky me)

 - The issue occurs both when running the app and in the DW painter when choosing File > Print Report

I'll also report this as a bug, but I thought I'd throw it out here to see if anyone else had encountered this problem and come up with a workaround.

Mark Goldsmith Accepted Answer Pending Moderation
  1. Saturday, 24 April 2021 00:21 AM UTC
  2. PowerBuilder
  3. # 1

Hi Ronnie,

I think this is similar to another post (see link below) and part of the issue has to do with printers being auto installed with a WSD (Web Services for Devices) based driver. You've already discovered one fix which is changing the driver/ port (thus switching it from a WSD port to a TCP/IP port using a generic driver), but you could also reinstall using the printer-specific driver (thus keeping full printer functionality) and just ensure the WSD setting is not used or change it back to a TCP/IP type port once installed.

However, I believe the other part of the issue is...and it appears to be the case based on your screenshots...that a document name has not been specified in the print specifications tab or subsequently in code since it's missing in the print queue.  I think if you were to provide a document name for the datawindows they will print fine, irrespective of whether a WSD port is used or a traditional TCP/IP port.

Not sure if this is a bug, maybe, but hopefully Appeon will chime in with their thoughts.

Here's the link:  https://community.appeon.com/index.php/qna/q-a/2019-r3-will-not-print


HTH...regards,

Mark

Comment
  1. Mark Goldsmith
  2. Tuesday, 27 April 2021 23:03 PM UTC
UPDATE: Ronnie I was curious after your last reply regarding the delay it took for print jobs in R3 versus R2 and so I wanted to see what my experience would be. In so doing I discovered that my issue in printing from R2 was network related (from a laptop wirelessly connected with R2 still on it) and not due to the printer being configured via WSD. Once I resolved the network connectivity issue I was, in fact, able to print from R2 to the printer that won't print under R3 (albeit slower when it does through work-arounds)...my apologies for suggesting otherwise. Printing from PB8 is still an issue though.



Per Mike's comment maybe this is an old bug and maybe it comes and goes over the years with different PB versions but certainly something seems to have changed between 2019 R2 and R3. I'm glad you to see your bug ticket (6482) open and being worked on and if there is anything I can provide Appeon to assist with the ticket feel to reach out or have them do so.



Regards...Mark
  1. Helpful
  1. Ronnie Po
  2. Thursday, 29 April 2021 17:31 PM UTC
Thanks, Mark, no worries! I'm not sure how many underlying issues are involved here, but the Appeon team was quick to create an updated PBDWE.DLL which fixed the issue for me in my dev environment, i.e. R3 now behaves the same as R2. I'm currently testing the new DLL in a live environment - not usually recommended, but I've got my finger on the pulse...
  1. Helpful
  1. Mark Goldsmith
  2. Thursday, 29 April 2021 17:44 PM UTC
Yes I saw that in the ticket. Actually I downloaded it as well and swapped out the DLL (even though I'm still on 2670). To further satisfy my curiosity I also took the DLL from my install of R2 and put it into R3. Both versions allowed me to print to the WSD connected printer from R3. All of course in my dev environment, nothing in prod. just yet.



Thanks again for touching base Ronnie and best of luck re the prod. side of things.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.