Printer setup on second report
RB version 10.08
I'm printing two reports one after the other with ShowPrintDialog true on
the first and false on the second. I need to transfer the printer selection
from the first dialog to the second report. I understand the printer name
is not saved in the first report's PrinterSetup properties and, according to
previous posts, I need to get the printer name from the first report's
PrintDialog properties.
Am I on-track and exactly how do you do that? Where is the printer name in
the PrintDialog?
Thanks
--
Bill Skelton
Landmark Data Systems, Inc.
Two Old River Place, Suite L
Jackson, MS 39202-3435
601-362-0303
I'm printing two reports one after the other with ShowPrintDialog true on
the first and false on the second. I need to transfer the printer selection
from the first dialog to the second report. I understand the printer name
is not saved in the first report's PrinterSetup properties and, according to
previous posts, I need to get the printer name from the first report's
PrintDialog properties.
Am I on-track and exactly how do you do that? Where is the printer name in
the PrintDialog?
Thanks
--
Bill Skelton
Landmark Data Systems, Inc.
Two Old River Place, Suite L
Jackson, MS 39202-3435
601-362-0303
This discussion has been closed.
Comments
Try accessing the PrintDialog.Printer.PrinterSetup property. This is what
gets assigned to the report after the print dialog closes.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
ppReport.PrintDialog.Printer.PrinterSetup.PrinterName ??? (no PrinterSetup
property in Printer)
Am I missing a unit in my uses statement?
Bill
Sorry, the Printer property is a TObject type (most likely to avoid circular
references). Your code would look something like the following...
uses
ppPrintr;
lsPrinterName :=
TppPrinter(ppReport1.PrintDialog.Printer).PrinterSetup.PrinterName;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
to catch it before the report was destroyed.
Many thanks Nico.