FooterBeforePrint and PageNo... Help please!!!
Dears,
I would like to print some information in a band PageFooter only if it is
the last page of the report. I tried the following code in the event
BeforePrint of the band PageFooter:
procedure FooterBeforePrint;
begin
if Report.PageNo = Report.PageCount then
begin
Label1.Text := ' Last Page ';
end
else
begin
Label1.Text := 'Page any ';
end;
end;
However, it didn't work... PageNo is always equal to PageCount. (I altered
the property CachePages=TRUE and it didn't also work). How can I test in the
event BeforePrint of the band PageFooter if I am in the last page?
Thanks,
[]s,
Alessandro Ferreira
I would like to print some information in a band PageFooter only if it is
the last page of the report. I tried the following code in the event
BeforePrint of the band PageFooter:
procedure FooterBeforePrint;
begin
if Report.PageNo = Report.PageCount then
begin
Label1.Text := ' Last Page ';
end
else
begin
Label1.Text := 'Page any ';
end;
end;
However, it didn't work... PageNo is always equal to PageCount. (I altered
the property CachePages=TRUE and it didn't also work). How can I test in the
event BeforePrint of the band PageFooter if I am in the last page?
Thanks,
[]s,
Alessandro Ferreira
This discussion has been closed.
Comments
I would first suggest using the Report.AbsolutePageNo and
Report.AbsolutePageCount properties when counting pages in your report. If
you set the your Report.PassSetting to psTwoPass, the AbsolutePageNo will be
updated.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks!
[]s,
Alessandro Ferreira