Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Printing with out showing printer dialog.

edited February 2004 in General

Hello,


I am trying to print a report directly to a given printer index without
showing the preview form or printer dialog first. Here is the code I am
working with:


ContractReport.Template.FileName :=ReportFile;
ContractReport.Template.Load;
ContractReport.ShowPrinterDialog := False;
ContractReport.PrinterSetup.PrinterName := Printer.Printers
[DeviceIndex];
Printer.PrinterIndex := DeviceIndex;
ContractReport.PrintReport;

For some reason it still shows me the "select printer" dialog box when
I print the report. I have also tried PrintToDevices and it does not do
anything. Any help would be greatly appriciated.

Thanks

J. Michael Eubanks
Ideal Software Systems, Inc.

Comments

This discussion has been closed.