Simplicty and flexibility!


DocumentRun() and printing to a specific printer


Started by Paul Cheeseman
Search
You will need to Sign In to be able to add or comment on the forum!

DocumentRun() and printing to a specific printer

Using documentrun() I can succesfully print as I want (email, pdf, printer) until I try to specify which printer to print to.

DocumentRun("REP_ReminderPrintForms_PDF","Printer","") works fine, to the default printer

DocumentRun("REP_ReminderPrintForms_PDF","Printer","\\waprinters\receptioninvoices") still only prints to the default printer.

I have tried other printers, including a local printer, but it only prints to default.


Suggestions?


Written by Paul Cheeseman 14/07/23 at 13:58:09 Not product specific.

Re:DocumentRun() and printing to a specific printer

Yes, you are correct. We have forwarded the bug to the development team.

In the meantime you can use a workaround to set the default printer and re-set it after the print.

SetVar("DefaultPrinter",Getcurrent("@DefaultPrinter"))+SetCurrent("@DefaultPrinter",GetCurrent("@printer1"))+DocumentRun("SomeDataDQL","printer","")+SetCurrent("@DefaultPrinter",GetVar("DefaultPrinter"))

We appreciate that it is a little cumbersome but it will work at least.


Written by DataEase 17/07/23 at 13:08:23 Dataease 9 Developer
DG3_ForumList