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.
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.