DataEase 8.5 - New functionality SetState("@PrinterN") added. Set Workstation/Application Printers from app.
To be able to properly control/manage where your output is sent is crucial for a "seamless" working of an app.
In DataEase 8 we have re-introduced Application/Workstation Printers. You find the GUI dialogue for this in Application/Define Application Printers.
However, often it is inconvenient to have to do this manually in the GUI so we have now implemented this as part of SetState()/GetCurrent() to both set these printer default as well as reading them out with GetCurrent().
You can also read out and set the Default printer with the same functions.
Syntax for App/Workstation printers is GetCurrent("@printer1") to GetCurrent("@printer4") and for Default its GetCurrent("@defaultprinter").
To set the same you use SetState("@printer1","Printername") and SetState("@defaultprinter","PrinterName").
PrintMemo(), PrintHMTL() and MemoExecDQL() is dependent on printing directly to the default printer, so you will have to change the default printer to the AppPrinter or any
other printer you want to use before calling these functions (and then change it back after if you like).
PS! THIS SAMPLE WILL ONLY RUN IN DATAEASE 8.5