PDA

View Full Version : printing without user interaction


ABC123

MRTankle
04-02-2014, 10:07 AM
I need to be able to print to a journal printer whenever a transaction is completed. I need to force output to a locally connected printer and print without user interaction. I'm pretty sure I can't do this in a web app; is there a way to do this in a desktop app?

Thanks for your insights.

Stan Mathews
04-02-2014, 11:15 AM
whenever a transaction is completedYou just need to find some event that signifies a transaction is completed. Might be the onsaverecord event in the table field rules.

MRTankle
04-02-2014, 11:54 AM
You just need to find some event that signifies a transaction is completed. Might be the onsaverecord event in the table field rules.

Thanks, Stan. I got that part. What I'm looking for is how to send to the printer without having to preview first. And how to force output to a specific printer. The journals are like grocery store receipts that are attached to supporting paper work. Other printers and options are o.k. for other "normal" reports but not for these.

Thanks again.

Stan Mathews
04-02-2014, 12:18 PM
See the documentation for report.printer_override which suggests

Set the printer, prints a report, then restores the printer.

last_printer = :report.printer_override("HPLaserJet 4P") 'whatever printer you want
:report.print("invoices")
:report.printer_override(last_printer)

No mention of any previewing.