建立一个ChildBand和Footer, 将ChildBand的高度及表格设为与你SHOW数据那个MasterDataBandBAND一样.
在MasterDataBand里面OnBeforePrint写下面代码
var
PageLine: integer;
PageMaxRow: integer=10;
procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
begin
PageLine := <line> mod PageMaxRow;
if (PageLine = 1) and (<line> > 1) then
begin
Engine.newpage;
Engine.ShowBand(Header1);
end;
end;
在Footer的OnBeforePrint写
procedure Footer1OnBeforePrint(Sender: TfrxComponent);
var
i: integer;
begin
i := iif(PageLine=0, PageMaxRow, PageLine);
while i < PageMaxRowdo
begin
i := i + 1;
Engine.ShowBand(Child1);
end;
end;