How To…Print to the Printer and File Device

Question

“How do I print my report to the printer and a file device (PDF, Text, etc.) at the same time?”

Solution

Use the TppReport.OnPrintDialogClose event to create the file device and assign its Publisher and PageRequest property to the report’s.

Download: PrintToPrinterAndArchive.zip
PrinterToPrinterAndPDF.zip
PrintToPrinterAndTextFile.zip

Sample Delphi code: