Dear Sir, We are working with Navision 3.10( Navision Attain) and with Citrix as a customer. The problem we have is when we are printing a document the program do not print in the predetermined printer but in the one that the last costumer Citrix has closed ( It prints in the last session of the costumer Citrix that has been opened). I have been revising the answers about this problem and their solutions in the forum and they refer to the codeunit 1 and to the file” ne number fix” from mynavision.net web page. I implemented codeunit 1 but it does not work . I also tried to reboot the costumer ( Citrix) without success. I realize that when we are working whit the debugger device the printer selected in the function “ Select printer” is the correct one but when appears the screen to select the printer then it is incorrect. I would be grateful if someone could give me a solution.
Hi, with this code you can fix this for a terminal server (I think it’s the same for citrix) Function Findprinter in CU 1 CLEAR(PrinterSelection); IF NOT PrinterSelection.GET(USERID,ReportID) THEN IF NOT PrinterSelection.GET(’’,ReportID) THEN IF NOT PrinterSelection.GET(USERID,0) THEN IF PrinterSelection.GET(’’,0) THEN; IF STRPOS(PrinterSelection.“Printer Name”,’,’) = 0 THEN EXIT(PrinterSelection.“Printer Name”) ELSE BEGIN Printer.SETFILTER(Name,’%1’,’@’+COPYSTR(PrinterSelection.“Printer Name”,1,STRPOS(PrinterSelection.“Printer Name”,’,’)-1)+’*’); IF Printer.FIND(’-’) THEN EXIT(Printer.Name+’,’+Printer.Device); END;
How do you declare Printer (as Recordset? if so what table?) Printer.SETFILTER(Name,’%1’,’@’+COPYSTR(PrinterSelection."…
The above fix solves most problems, you should however avoid adding new printerdrivers to the citrix server and to clients with mapped printers while Navision users are logged in and active. Otherwise you may still experience problems.