procedure TfrmInvoicePrt.frReport2ManualBuild(Page: TfrPage);
var
i,j,k,iSum: Integer;
begin
while not frdbdataset1.Eofdo
begin
iSum := aqry_erpDataInHis.RecordCount ;
i := 0 ;
Page.FindObject('Memo43').Memo.Text := '共 '+IntToStr(Round(isum/(26+0.5)+0.5))+' 页';
Page.FindObject('Memo6').Memo.Text := '第 1 页' ;
Page.ShowBandByName('主项数据2');
Page.ShowBandByName('细项头1');
k:=1;
while not frDBDataSet2.Eofdo
begin
i := i + 1 ;
if i > 26 then
begin
Page.ShowBandByName('细项脚1');
//Page.ShowBandByName('主项脚1');
Page.NewPage ;
k:=k+1;
Page.FindObject('Memo6').Memo.Text := '第 '+IntToStr(k)+' 页' ;
Page.ShowBandByName('主项数据2');
Page.ShowBandByName('细项头1');
i := 1 ;
end ;
Page.FindObject('Memo24').Memo.Text := IntToStr(aqry_erpDataInHis.RecNo) ;
Page.ShowBandByName('细项数据1');
frDBDataSet2.Next;
end ;
for j := i to 26do
begin
Page.ShowBandByName('子1');
end;
Page.ShowBandByName('细项脚1');
Page.ShowBandByName('主项脚1');
frdbdataset1.Next;
if not frdbdataset1.Eof then
Page.NewPage ;
end ;
end;