unit bianji
public
{ Public declarations }
FMaxPage:integer;
Nrecordcount:integer;
uses bianji1;
procedure TF_bianji.Button2Click(Sender: TObject);
begin
Application.CreateForm(TF_bianji1,F_bianji1);
F_bianji1.QuickRep1.Visible:=False;
F_bianji1.QuickRep1.Prepare;
FMaxPage :=F_bianji1.QuickRep1.Printer.PageCount;
Nrecordcount:=adoquery1.RecordCount;
F_bianji1.QuickRep1.Preview;
F_bianji1.Close;
end;
---------------------------------------------------------------
unit bianji1
..
uses bianji;
procedure TF_bianji1.PageFooterBand1BeforePrint(Sender: TQRCustomBand;
var PrintBand: Boolean);
begin
QRLabel13.Caption:= '第' + IntToStr(QuickRep1.PageNumber) + '页(共' + IntToStr(F_bianji.FMaxPage) + '页,'+'共'+IntToStr(F_bianji.Nrecordcount)+'人)';
end;