Reading report.PrintOptions.Copies
Hi,
i have to print several reports in Delphi after each other (as i must archive them as separate files). For the first print the print dialogue is shown. All subsequent reports do not show the print dialogue and are sent to the same printer.
Here comes my problem:
The number of copies must be set equal on all reports. Thus if the user selected two copies all reports should be printed twice.
I can set the default number of copies by report.PrintOptions.Copies := NumberOfCopies.
But how can i read the number of copies the user selected in the print dialogue of FastReports? I tried this after the report.print: NumberOfCopies := report.PrintOptions.Copies;
This does not work as the value remains at the initial default value.
How must i do this?
i have to print several reports in Delphi after each other (as i must archive them as separate files). For the first print the print dialogue is shown. All subsequent reports do not show the print dialogue and are sent to the same printer.
Here comes my problem:
The number of copies must be set equal on all reports. Thus if the user selected two copies all reports should be printed twice.
I can set the default number of copies by report.PrintOptions.Copies := NumberOfCopies.
But how can i read the number of copies the user selected in the print dialogue of FastReports? I tried this after the report.print: NumberOfCopies := report.PrintOptions.Copies;
This does not work as the value remains at the initial default value.
How must i do this?
Comments
I am not sure if the OnReportPrint event would be able to capture that info from the system print dialog. But, in your Delphi code, you could call a TPrintDialog ahead of your first report, where the user would select the printer and number of copies, and then call all the reports to print directly, without displaying a FR print dialog, but updating each report's PrintOptions.Copies