EDIT since the previous* answer does not work with newer versions
Set rowcount to 9 for your masterdata band of the subreport.
In your mainreport, copy the masterdata band containing the subreport and insert it twice.
Put a headerband between the masterbands with property StartNewPage set to true.
Add OnBeforePrint events to the second and the third subreport to change the filter for the dataset.
procedure Subreport2OnBeforePrint(Sender: TfrxComponent);
begin
TfrxDBDataSet(Report.GetDataset('frxDBDataset1')).Dataset.Filter := 'ID>9';
TfrxDBDataSet(Report.GetDataset('frxDBDataset1')).Dataset.Filtered := true;
end;
procedure Subreport3OnBeforePrint(Sender: TfrxComponent);
begin
TfrxDBDataSet(Report.GetDataset('frxDBDataset1')).Dataset.Filter := 'ID>18';
TfrxDBDataSet(Report.GetDataset('frxDBDataset1')).Dataset.Filtered := true;
end;
(*) for older report versions, you can use an other approach, which stopped working between the versions 4.10.01 and 4.12.14.
Add an OnAfterPrint event to your memo on the subreport. Set the property StartNewPage to true after printing 9 "lines", Rowcount of the Masterband has to set to 1.
procedure YourMemoFromTheSubReportToRepeat9TimesPerPageOnAfterPrint(Sender: TfrxComponent);
begin
MasterDataBandFromSubReport.StartNewPage := <Line#> mod 9 = 0
end;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…