Has Powerbuilder addressed the issue that Windows introduced in Server 2016 where in some remote environments there is an issue when mapping default client printers and that information being retained outside of the current session? Here is an article we would outlining the issue https://social.technet.microsoft.com/Forums/windowsserver/en-US/785cbcc6-4f0b-4d88-b12f-2b1d89b85a44/remoteapp-default-printer-redirection-not-working-in-server-2016?forum=winserverTS
This issue has been fixed in this latest beta release. Please visithttps://www.appeon.com/developers/pb-2019-beta.html for details about the Beta Program (including the GA release schedule) and download and install the beta version to verify the issue.
The fix will also be included in the coming PB 2017 R3 MR release. It is scheduled to be released by the end of this month. You can get the latest status from this link:
I upgraded to build 1915 but still it does not highlight the default printer all the time. My application is calling PRINT() in-built function but no luck.
Even PrintSetUp() dialog box does not highlight the default printer.
I am not sure if I need to apply Roland's fix to call GetDefaultPrinterW() Windows API.
- Vipin Dwivedi
- Tuesday, 2 March 2021 07:57 AM UTC
Waiting for your comment. Shall I go and apply Roland fix or Appeon is going to do something?
- Vipin Dwivedi
- Friday, 5 March 2021 22:58 PM UTC
Sorry for the late reply.
We suggest that you try Windows API GetDefaultPrinterW() Windows API.
BTW, I also checked your post on the community site, and it seems that is a new bug that we didn’t fix before.
If the issue can’t be worked around, I suggest that you report this problem to our ticket system: https://www.appeon.com/standardsupport/newbug so it can be properly received and tracked.
Please also provide a sample PB test case (with PBT/PBL) when you submit it to the ticket system.
- Mark Lee @Appeon
- Monday, 8 March 2021 07:52 AM UTC
We've been having this problem as well.
When you run a remote app, the printer info is copied from your local profile to your profile on the server. This allows the remotely run app to see your local printers and to know which one is default.
The problem is that the profile update and the application are run in parallel. When the PowerBuilder runtime calls GetDefaultPrinter, the operating system hasn't finished copying the profiles so the application has the wrong printer as the default.
To get around this, you need to call GetDefaultPrinter from your PB code and then feed the result into the built in function PrintSetPrinter.
Because the profile update may not be finished, you have to wait as long as possible before doing it. In our app I added it to the end of the main window pfc_postopen event.
String ls_null, ls_DefaultPrinter
// Size the buffer
ls_DefaultPrinter = Space(lul_buffer)
// Get the Windows default printer
// Set the PowerBuilder default printer
- Roland Smith
- Thursday, 17 January 2019 16:28 PM UTC
Regarding specifying default printer issue in remote Windows Server 2016, PB 2017 itself doesn’t do any optimization. After all, this issue is caused by Windows environment.
We haven’t used RemoteApp tool, so we are not sure whether the issue also exists in PB 2017.
We will also study and verify the issue with using this tool.
Did you get any fix? I tried in PB-2017R3 MR 1858,1880, 1915 but all are highlighting the server printer and not client redirect printer. PrintGetPrinter() in-build PB function gives different result(server default printer) while GetDefaultPrinter() gives client redirect printer (but not all the time).
- Vipin Dwivedi
- Friday, 5 March 2021 23:03 PM UTC
- Page :
However, you are not allowed to reply to this question.