Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Header and footer

edited February 2007 in End User
Hi,

I need make a report with the header and footer has the same function that
the title and sumary band. So, I want that the hearder print only in the
first page and footer print only in the last page. But I couldn't make this.

I tried two ways, first :

ppReport1.HeaderBand.PrintOnFirstPage := true;
ppReport1.HeaderBand.PrintOnLastPage := false;
ppReport1.FooterBand.PrintOnFirstPage := false;
ppReport1.FooterBand.PrintOnLastPage := true;

But this way not work if I have 3 pages, like this:

-------- Page 1 --------
List of names (title)
name age (hearder)
(details)
-------- Page 2 --------
name age (hearder) - But this I don't want that appears !!!
(details)
Agriness - Gerenciamento para Agroempresas (footer) - And this neither !!!
-------- Page 3 --------
(details)
Total: 20 (sumary)
Agriness - Gerenciamento para Agroempresas (footer)
-----------------------

And the second way:

procedure TForm1.ppHeaderBand1BeforePrint(Sender: TObject);
begin
TppBand(Sender).Visible := TppBand(Sender).Report.PageNo = 1;
end;

procedure TForm1.ppFooterBand1BeforePrint(Sender: TObject);
begin
TppBand(Sender).Visible := TppBand(Sender).Report.PageNo =
TppBand(Sender).Report.PageCount;
end;

This way appear like I want, but the page 2 and page 3 are repeat same
details, like this:

-------- Page 2 --------
(details)
Priscila 25
Thiago 22
Peter 23
-------- Page 3 --------
Thiago 22
Peter 23
Carla 44
(details)
Total: 20 (sumary)
Agriness - Gerenciamento para Agroempresas (footer)
-----------------------

Any idea??

Thanks,
Priscila

.:: Priscila Tavares Lugon ::. Tecnologia
Agriness - Gerenciamento para Agroempresas
(48) 3028-0015 ::. www.agriness.com

Comments

  • edited February 2007
    Hi Priscila,

    Is there a reason you cannot just use the title and summary band? These
    bands are designed to appear only on the first and last page. If you would
    like some logical separation between report components inside these bands,
    you can add multiple regions and place the components inside them.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.