Options

Printer selection problem (on citrix?)

CaponeCapone Member Posts: 125
edited 2012-03-27 in NAV Three Tier
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)
Hello IT, have you tried to turn it off and on?
Have you checked the cables?
Have you released the filters?

http://www.navfreak.com

Comments

  • Options
    deV.chdeV.ch Member Posts: 543
    is your wshell created on client side?

    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.
  • Options
    CaponeCapone Member Posts: 125
    Thank you for noting that.

    I changed to:
    CREATE(WshShell,FALSE,TRUE);
    
    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.
    Hello IT, have you tried to turn it off and on?
    Have you checked the cables?
    Have you released the filters?

    http://www.navfreak.com
Sign In or Register to comment.