给你个例子,是FASTREPORT脚本
var PageRows:integer;
procedure ColumnFooter1OnBeforePrint(Sender: TfrxComponent);
begin
end;
procedure DetailData1OnAfterPrint(Sender: TfrxComponent);
begin
PageRows:=PageRows+1;
if PageRows>=10 then
Engine.NewPage;
end;
procedure ColumnHeader1OnAfterPrint(Sender: TfrxComponent);
begin
end;
procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
begin
while (PageRows>=0) and (PageRows<10)do
begin
Engine.showband(Child1);
PageRows:=PageRows+1;
end;
if PageRows>=10 then
Engine.Newpage;
end;
procedure PageFooter1OnAfterPrint(Sender: TfrxComponent);
begin
PageRows:=0;
end;
procedure MasterData1OnAfterPrint(Sender: TfrxComponent);
begin
// if MasterData1.DataSet.Count=MasterData1.DataSet.RecNo then
// showmessage('aaaa');
end;
begin
PageRows:=-1 ;
showmessage(Engine.COUNT(MasterData1));
end.