LR : Adding event property before&after print
Original Reporter info from Mantis: corb
-
Reporter name: Michel Tournay
Original Reporter info from Mantis: corb
- Reporter name: Michel Tournay
Description:
For convenience, I've added two events to TfrReport class :
- onBeforePrint
- onAfterPrint
Additional information:
first, add in type section
TManualBuildEvent = procedure(Page: TfrPage) of object;
TOnPrintEvent = procedure of object; <--this
second, add in private section of TfrReport
FOnManualBuild: TManualBuildEvent;
FOnBeforePrint: TOnPrintEvent; <--this
FOnAfterPrint: TOnPrintEvent; <--and this
third, add in published section of TfrReport
property OnExportFilterSetup: TExportFilterSetup read FOnExportFilterSetup write FOnExportFilterSetup;
property OnBeforePrint: TOnPrintEvent read FOnBeforePrint write FOnBeforePrint; <--this
property OnAfterPrint: TOnPrintEvent read FOnAfterPrint write FOnAfterPrint; <--and this
At last, add at beginning of procedure TfrReport.DoPrintReport(const PageNumbers: String; Copies: Integer);
if assigned(FOnBeforePrint) then
FOnBeforePrint;
and at the end
if assigned(FOnAfterPrint) then
FOnAfterPrint;
Mantis conversion info:
- Mantis ID: 25778
- OS: Windows
- OS Build: 7Pro 64b
- Platform: i386
- Version: 1.0.4
- Fixed in version: 1.3 (SVN)
- Fixed in revision: 44779 (#1a60920e)
- Target version: 1.4