Hi!
Has anyone have had problems with that RTC client won't use the system default printer when using
REPORT.RUNMODAL(ReportID, FALSE, TRUE, RecordToSend);
?
I have a case when it doesn't choose the system printer but instead uses the printer in the printer selection.
In the NAV printer selection "\\dhfs1\multiprinter-reception-2" is defined as default printer for all users to the invoice report. If I use another printer which doesn't have "\\" in the name it works.
This is how the code is built:
I'm using 3rd party automation to change system default printer.
After that I validate that it has changed the printer with following code
RegKey := 'HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device';
DefaultWindowsPrinter := WshShell.RegRead(RegKey);
MESSAGE('Default:%1\New Printer:%2',WshShell.RegRead(RegKey),PDFPrinter);
Even though the message says it is the correct printer it sends the printout to "\\dhfs1\multiprinter-reception-2" and the problem doesn't seem to exist in the classic client.
I haven't been able to pinpoint if it is a citrix problem but it doesn't seem like it.
They are running version 2009 R2 client (build 6.0.32012.0)
Comments
It's the second parameter of create(true, true) => which means, create new instance on client side
if you don't do so your wsh is created on server side, => it changes the default printer on the server, that doesn't affect your printing because printing is done client side.
I changed to: But the problem still appeared..
The automation that changes the default printer is an ocx which means it runs local on the client.
The issue is that it does not work when the printer in the printer selections is a network share but works when it is a local printer.
Have you checked the cables?
Have you released the filters?
http://www.navfreak.com