You are reading help file online using chmlib.com
|
Rave Reports Developer Reference TBaseReport. OnPrintPage event (read/write/published) |
Top Previous Next |
Declaration function OnPrintPage( Sender: TObject; var PageNum: Integer): Boolean;
Category
Description This event will be called when it is time to print the body of a page for the report. This event will only be called if an OnPrint event handler does not already exist for this report. To begin a new page, return a result of true; otherwise, to finish the report just exit this event with a result of false. This event is useful for reports that are the same from page to page.
See also TBaseReport Class, Execute, OnPrint
Example (Delphi) function TReportForm.PrintPageReport3(Sender: TObject; var PageNum: integer): Boolean; begin { PrintPageReport3 } with Sender as TBaseReport do begin SetFont('Times New Roman',10); Home;
{ Print memo buffer } SetColumns(3,0.25); MemoBuf.PrintStart := ColumnStart; MemoBuf.PrintEnd := ColumnEnd; PrintMemo(MemoBuf, ColumnLinesLeft, false); ClearColumns;
Result := not MemoBuf.Empty; end; { with } end; { PrintPageReport3 }
Example (C++Builder) bool __fastcall TReportForm:: PrintPageReport3 (TObject *Sender, int &PageNum) { TBaseReport* rp = dynamic_cast<TBaseReport*>(Sender);
rp1->SetFont("Times New Roman",10); rp1->Home();
// Print memo buffer rp1->SetColumns(3,0.25); MemoBuf->PrintStart = rp1->ColumnStart; MemoBuf->PrintEnd = rp1->ColumnEnd; rp1->PrintMemo(MemoBuf, rp1->ColumnLinesLeft(), false); rp1->ClearColumns();
return !MemoBuf->Empty(); } |
You are reading help file online using chmlib.com
|