Hi everyone,
I am working on sending printed documents to different Printers based on customer settings.
I was reading through many posts but did not find exactly what i am looking for so I am starting this new Post.
There are three major questions that are keeping me busy:
1) I want to print to a network printer which might not be installed on all clients. If I am sending "\\server\printername" through Report selection Navision selects the default Windows Printer for this job. I assume that Navision is comparing the selction with table "Printer" if the printer exists. Does anyone know a solution for this.
2) Can i find out which printer is actually used by Navision (not according to Report selection) as the user has the chance to change the printer manually when printing document (e.g. in on after get record of the Header Table).
3) Can i see the code somewhere which is calling "Find Printer" function in CU1 which is run when the report is called. This might help me understand this better.
I am using NAV 4.03
Answers and hints are highly appreciated
Thank you very much!
Best regards,
SchEdu
Answers
1) Most likely, NAV just uses the name of the configured printer in it's Windows API calls and the Windows printing subsystem does the fallback. What kind of solution do you have in mind? You want to detect the non-existence or even the state of the printer and define a fallback yourself? The former can be done using the Printer virtual table, for the latter see for example Printer status from NAV5.1
2) Not from within NAV. I am pretty sure there are auditing possibilities in Windows for this, but I am not an experienced Windows Admin. I'd say there ought to be configuration to log printed jobs to the eventlog, And likely there are ways using WMI. Google for this, if it is an option to you.
3) No
thanks for your reply.
1) I am thinking of using this printer anyway. If windows is doing the fallback I will probably need to search for a solution to map the printer if it does not exist at the time of printing - which might be indicated by the nonexistance of the printer in the virtual pritner table. Is there a way to refresh this printer table?
2) We are using a virtual printer which can set action by commands in the print stream which i only want to send if the printer is the same printer as defined in a setup. This is to ensure that the printer understands the commands and does not simply print it. Therefore I need to know which printer will be used at the last possible moment. The only solution that cames into my mind is to use "UseReqForm" false and force the system to use the printer i am defining by using the printer selection table. Unfortunately the scope is to make the solution very very flexible :-k
I will ask google about WMI - maybe there is something i can use.
Thanks again!
Best regards,
schedu