Masterdata over two different pages

Hello guys,

I have a problem, I need to show 2 lines on the first page (masterdata1) and i want the rest of my lines (masterdata2) on the second page.
I have a footer that i want only on the first page and a pagefooter for all the pages.
For example:
If i have 4 lines in total, my problem, on the second page, i have the first and the third lines, not the rest.
I want to do an official document (see attachments).

Here is my code

var
ds: TfrxDataSet;

procedure Page1OnBeforePrint(Sender: TfrxComponent);
begin
if ds.recordcount > 2 then
begin
ds.first;
MasterData1.rowcount := 2;
MasterData2.rowcount := ds.recordcount - 2;
//showmessage(MasterData1.rowcount) ;
//showmessage(MasterData2.rowcount) ;
page3.visible := true;
page1.visible := true;
end
else
begin
page3.visible := false;
page1.visible := true;
MasterData1.rowcount := ds.recordcount;
MasterData2.rowcount:= 0;
end;
end;

procedure MasterData1OnAfterPrint(Sender: TfrxComponent);
begin
ds.next;
//showmessage(ds.next);
end;


procedure MasterData2OnAfterPrint(Sender: TfrxComponent);
begin
ds.next;
//masterData2.rowcount := ds.recordcount - 2;

end;


begin
ds := Report.GetDataset('PERSO01'); //the user name of the detaildataset
end.


Thanks in advance for your help.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.