Ability to Save PrinterSetup when report is printed
I am trying to save the PrinterSetup when a user prints a report to allow my
program to automatically send it to the same place they sent it the last
time. I can set the PrinterSetup.PrinterName, PrinterSetup.BinName,
PrinterSetup.PaperName before calling Print, but if the user changes the
print destination, it is not reflected in the TppReport.PrinterSetup after
printing. How can I determine where the user printed a report using the
standard PrintDialog?
program to automatically send it to the same place they sent it the last
time. I can set the PrinterSetup.PrinterName, PrinterSetup.BinName,
PrinterSetup.PaperName before calling Print, but if the user changes the
print destination, it is not reflected in the TppReport.PrinterSetup after
printing. How can I determine where the user printed a report using the
standard PrintDialog?
This discussion has been closed.
Comments
It works for me if I have a BeforePrint event for the report, with a line
something like
theprinter:=ppreport1.printersetup.printername
etc.
The BeforePrint event appears to fire before printing but after the print
dialog has gone away.
Hope this helps
Carl
There is a saveprintersetup property on the report as well.
If set, any properties which the user changed will remain.
It's under ppreport1.printersetup I think.
Hope this helps
Carl Davies
set this and be good to go.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
it's possible to keep
printer settings( such as paper type and print quality) during a program
session.
I also don't want to asociate those setting with a particular report( using
SavePrinterSetup)
or printer default setting.
Ex: if decide to print on A4, best quality some report I'd like the next
opened one to keep the same settings when printed.....
Thanks in advance, Dan E.Mincu
values when the dialog is closed (Report.OnPrintDialogClose event). Then
you'll need to configure the Report.PritnerSetup object when you go to print
the next report. For example, to get the papername that hte user entered in
the properties dialog of the print dialog:
uses
ppPrintr;
procedure TForm1.ppReport1PrintDialogClose(Sender: TObject);
var
lsPaperName: String;
begin
lsPaperName :=
TppPrinter(ppReport1.PrintDialog.Printer).PrinterSetup.PaperName;
...
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
but how do I preserve
specific driver settings like Printer Quality, Printer Resolution, Image
Enhancements considering almost
each printer have different custom settings. Word and ather programs does it
by default and this is the
expected behaviour in a program...
Thanks,
Dan E.Mincu
properties that can be configured for each printer. Thankyou, for the
suggestion. I'll add it to the ToDo list.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com