TppGroup.NewPage
Hi !
I have 24 groups in my report. Sometimes, I must break a page after
printing a group, and sometimes not. TppDBPipeline.OnTraversal, I set the
NewPage property of the group to true or False. It works perfectly like it
should until the last page is printed. I mean, during the print job to the
screen, the report is ok, the page continue to be incremented, and when the
last page is reached some datas is looses on the first page, because the
last group seems to have priority. Is it possible to change the NewPage
property during printing job ? The NewPage property of the last group is
set to true, and the first and second ones is set to False.
During the print job When
the report is completed
First page :
First page :
Group 1
Group 1
----
----
----
----
----
----
Group 2 --?Will disappear
--- --?Will disappear
--- --?Will disappear
-------NewPage------ -------Ne
wPage------
Group 2
Group 2
---
---
Group 3 --?Will disappear Group 3
Please, answer me as soon as possible !
Fred
P.S. Sorry for my poor english, I'm french canadian.
I have 24 groups in my report. Sometimes, I must break a page after
printing a group, and sometimes not. TppDBPipeline.OnTraversal, I set the
NewPage property of the group to true or False. It works perfectly like it
should until the last page is printed. I mean, during the print job to the
screen, the report is ok, the page continue to be incremented, and when the
last page is reached some datas is looses on the first page, because the
last group seems to have priority. Is it possible to change the NewPage
property during printing job ? The NewPage property of the last group is
set to true, and the first and second ones is set to False.
During the print job When
the report is completed
First page :
First page :
Group 1
Group 1
----
----
----
----
----
----
Group 2 --?Will disappear
--- --?Will disappear
--- --?Will disappear
-------NewPage------ -------Ne
wPage------
Group 2
Group 2
---
---
Group 3 --?Will disappear Group 3
Please, answer me as soon as possible !
Fred
P.S. Sorry for my poor english, I'm french canadian.
This discussion has been closed.
Comments
It will fire everytime the data pipeline moves its record position. It will
fire when the report engine moves forward or backward in the dataset in
order to complete the generation of a band for a page break. Try using the
Group.OnGetBreakValue event. I created a simple version with DBDEMOS
Customer-Orders tables joined and a group on the ordered Company field.
procedure TForm1.Button1Click(Sender: TObject);
begin
ppReport1.Print;
end;
procedure TForm1.ConfigureGroup;
begin
{create a new page for the last group}
if (ppReport1.DataPipeline['Company'] = 'Waterspout SCUBA Center') then
ppGroup1.NewPage := True
else
ppGroup1.NewPage := False;
end;
procedure TForm1.ppGroup1GetBreakValue(Sender: TObject; var aBreakValue:
String);
begin
ConfigureGroup;
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com