Printing with out showing printer dialog.
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.
This discussion has been closed.
Comments
Never mind. I figured it out.