Create and Change Current Default Printer on the fly

panobois

Member
Hi List,

We have a need to create on the fly a printer and make it the default one, once in a OW session, before lauching any UBE. I have written a NER function to do this, but I don't know where to put the call to that function ? I can't find any kind of "After OW is initialized", "Before or After Menu Display". I tried to hook in the P98UBE (Print to Screen/Printer/...)to put in my call, and also tried to hook in P986162 (Printer choice), but in those two hooks, system had already getting the default printer before the call to my function is done, and in the P986162 the default printer is not put.
Any idea where to put this call to make this work as wanted ?

B7332 and soon ERP8, on NT4/SQL7.
 
Have you tried to include it in jdeInitEnvBSFN (b0000182)? This function is called upon OneWorld initialisation.

To delete the default printer, use function jdeFreeEnvBSFN (b0000183). This function is called upon exiting Oneworld.

Make sure that the printer ADD function checks for any leftover default printer. This is due to the fact that a Oneworld session could be exited without a call to b0000183. Not only can the session crash, but it could also be ended by a terminal server administrator, be lost in a power outage or any other reason your imagination can come up with.

Good Luck!
 
Back
Top