Bug 6482

PB 2019 R3 DataWindow Print() error with some printers 07 May, 2021

Ronnie Po
23 April, 2021
Product: PowerBuilder Category: DataWindow
Version: 2019 R3 Build: 2670, 2703
Classification: Appeon bug Publishing: Public
Priority: P2
Status: Scheduling Reason:
Communication Status: Waiting for Customer
Mark Lee @Appeon 07 May, 2021
#11
Hi Ronnie,

Any update?

Regards,
Mark Lee
Mark Lee @Appeon 29 April, 2021
#10
Hi Ronnie,

Thanks for confirming that it works in your development machine.
We will wait for your test result from your client side.
Hope everything goes well!

Regards,
Mark Lee
Ronnie Po 29 April, 2021
#9
Hi Mark,

The new PBDWE.DLL fixes the issue for me in my development environment. I will test the DLL at a client location where the issue was first reported and will report back with the results.

Thank you and regards,
Ronnie Po
Mark Lee @Appeon 28 April, 2021
#8
Hi Ronnie,
 
Thanks for your feedback!
We look forward to hearing back from you about the verification results. Your test results will also affect the fixing progress of this bug. Your help is greatly appreciated!

Regards,
Mark Lee
Ronnie Po 27 April, 2021
#7
(In reply to Mark Lee @Appeon from comment #6)
new pbdwe.dll

Hi Ronnie,

As we said before, please replace the PBDWE.DLL (default directory is:
C:\Program Files (x86)\Appeon\Common\PowerBuilder\Runtime 19.2.0.2703) with
this attached one.
Please back up your old file before replacing them.
After that please restart the computer and see if it works on your side.
 
BTW, we haven't fully tested this fix yet, so we suggest that you do some
more Print functionality-related tests to verify if there are other issues. 
Thanks!

Regards,
Mark Lee
Hi Mark, Thank you for the fast response. I will try the new DLL and report back on the results. Yes, the issue occurs when the DocumentName property is not set. (Printer name is always set in all of my test scenarios.) Regards, Ronnie
Mark Lee @Appeon 27 April, 2021
#6
new pbdwe.dll

Hi Ronnie,

As we said before, please replace the PBDWE.DLL (default directory is: C:\Program Files (x86)\Appeon\Common\PowerBuilder\Runtime 19.2.0.2703) with this attached one.
Please back up your old file before replacing them.
After that please restart the computer and see if it works on your side.
 
BTW, we haven't fully tested this fix yet, so we suggest that you do some more Print functionality-related tests to verify if there are other issues. 
Thanks!

Regards,
Mark Lee
Mark Lee @Appeon 26 April, 2021
#5
Hi Ronnie,

Thanks for your feedback. Can you confirm that this issue is caused by that the DataWindow's DocumentName property is not set?
Is there any possibility that it is because the DataWindow's PrinterName property is not set?
 
If you are sure that it can be worked around after you specify a value to the  DataWindow's DocumentName property, then according to our analysis, it should be that some printers/drivers can't identify the empty/NULL displayed name in the print queue.
In this case, we will provide a temporary DLL file based on build 2703 for you to verify and see if it can be resolved. Thanks in advance.

Regards,
Mark Lee
Ronnie Po 26 April, 2021
#3
Hi Mark,

Thank you for your reply. There has been some discussion about this issue on the Community forum. It seems that, beginning with PB 2019 R3, for some printers/drivers, the print job will fail if the document name is not specified in the DataWindow's DocumentName property.
Mark Lee @Appeon 25 April, 2021
#2
Hi Ronnie,

Thanks for reporting this problem and providing the screenshots.
It seems that this issue is related to the various printer-specific driver.
Since you said this behavior does NOT occur with PB 2019 R2, please let us know the detailed build Number you used before (such as PB 2019 R2 Build 2353).
 
According to your description, I used HP LaserJet Professional P1606dn to print but it works well.
However, since I don’t have printers like Lexmark MS410 Series XL, HP Color LaserJet M454, HP Color LaserJet M255dw, I can’t verify them on our side.
 
Please confirm whether this issue relates to the print content of the DW? Does the issue always exist if you use that printer to print any content of DW? Are there any special settings on your PB code? Could you please provide a  reproducible sample test case (with PBT/PBL) for us to reproduce it on our side?
 
BTW, this issue seems weird and we are not sure if it is a bug, is it OK if we want to have a remote session with you to debug it?
 
 
Best regards,
Mark Lee
Ronnie Po 23 April, 2021
#1
screenshots.zip (210KB)

*Phenomenon:

Starting with PB 2019 R3, 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"
(see attachments)
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)
 - in some cases, there is no workaround for the specific printer
 - 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 using HP Color LaserJet M255dw
 - The issue occurs both when running the app and in the DW painter when choosing
File > Print Report


*Reproduce Steps:
(see above)

Remarks:
OS:
Windows 10
Platform:
64-bit
Database Type:
Database Version: