When do they really print to the printer?
D5EE, RB5.56 Pro
Hi RB team,
I have to track any printing of documents (i.e. every page of a multipage
report) in Report Builder.
Until now I could not find any event where I could hook into to be sure that
our endusers really have printed one, many or all pages of a report. Also
we need the info if printing was cancelled after a number of printed pages.
Do you havew any suggestion?
Thanks
Robbi
Hi RB team,
I have to track any printing of documents (i.e. every page of a multipage
report) in Report Builder.
Until now I could not find any event where I could hook into to be sure that
our endusers really have printed one, many or all pages of a report. Also
we need the info if printing was cancelled after a number of printed pages.
Do you havew any suggestion?
Thanks
Robbi
This discussion has been closed.
Comments
I configured the report to always print a page, even an empty page
([ndMessageDialog,ndBlankPage]). I hooked into the OnNoData event of the
report , but it is not fired when our report supresses printing an empty
detailband. We need all empty pages for documentation, so what's going
wrong?
Thanks again,
Robbi
------------------------------------------
Tech Tip: Detecting whether Report was
Printed to the Printer
------------------------------------------
The Report.AfterPrint event can be used to
determine whether the report was printed
to the printer (rather than preview, ...).
Example:
procedure TForm1.ppReport1AfterPrint(Sender: TObject);
begin
if (ppReport1.PrinterDevice <> nil) then
ShowMessage('Report was printed to the printer');
end;
Note: If the user cancels the report while it
is running, then the Report.OnCancel event will
fire, followed by the Report.AfterPrint event.
Example:
procedure TForm1.ppReport1Cancel(Sender: TObject);
begin
ShowMessage('Printing cancelled by user');
end;
--
Tech Support mailto:support@digital-metaphors.com
Digital Metaphors http://www.digital-metaphors.com
http://www.digital-metaphors.com
info@digital-metaphors.com
Thanks for your hint, I read it already before I came to this NG.
This document contains no answer to any of my questions!
So I ask you again for an real advice!
Robbi
Thanks for your hint, I read it already before I came to this NG.
This document contains no answer to any of my questions!
So I ask you again for an real advice!
Robbi
this question still is not answered :-((
We need an event to track the printing of every single page until printing
is finished or printing is cancelled by the user (i.e OnPagePrint(APage:
TppPage...)
Again I appreciate your assistance.
Thanks
Robbi
has been sent to the printer spool, it will print. Use the OnEndPage event
of the report. This event is triggered when the current page is about to be
sent to the output device. In this event, you can check the
Report.DeviceType = dtPrinter (uses ppTypes unit) to see if the report is
printing to the printer.
When the print dialog is displayed to the user, you can determine whether
the Cancel button was selected by using the Report.OnPrintDialogClose event.
Example:
procedure TForm1.ppReport1PrintDialogClose(Sender: TObject);
begin
if ppReport1.PrintDialog.ModalResult = mrCancel then
ShowMessage('Use chose to cancel the print request');
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
cancelling was not the problem why I aksed for your support. It get's more
difficulty if the user selecets various single pages or page groups in the
printer dialog (like "1,3,5-7").
With the cancelling information I could not figure out, at which page he
cancelled printing.
I'll try the OnEndPage event, probably I have to suppress this event while
the first pass is active on a two pass report.
Thanks again
Robbi
Report.SecondPass if you want to skip some code in event handlers for a
given pass.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com