Page Counting in Groups
Hi All,
I have a report printing client end of month statements, all is working
well, grouping on the client number.
However the statement for the odd one or two clients, out of hundreds,
flows to multiple pages.
Is it possible to determine, before printing, the number of pages, and
which page is current in a group? I need a different group header and
footer on each page in these cases (brought forward balances etc). I know
how to handle first and last pages for the whole report, but I need it for
the group.
Any help much appreciated.
Cheers
David.
I have a report printing client end of month statements, all is working
well, grouping on the client number.
However the statement for the odd one or two clients, out of hundreds,
flows to multiple pages.
Is it possible to determine, before printing, the number of pages, and
which page is current in a group? I need a different group header and
footer on each page in these cases (brought forward balances etc). I know
how to handle first and last pages for the whole report, but I need it for
the group.
Any help much appreciated.
Cheers
David.
This discussion has been closed.
Comments
If you create a two pass report (set Report.PassSetting to psTwoPass), you
can determine the group page count before viewing each group. Inside the
GroupHeader.BeforePrint event first check the Report.SecondPass property,
then check the Report.PageCount. Something like the following.
Note. Report.PageCount will give you the page count for the group/subreport
you are currently generating. Use Report.AbsolutePageCount for the count of
the entire report.
if Report.SecondPass then
if Report.PageCount > 1 then
begin
//Make changes
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks, just what I needed to know.
Cheers.