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

Showing part of footer on last page problem

edited December 2005 in General
Hello,

I will try my best to explain my situation. I am using RB 6.03. I need to
show the upper part of my footer on only the last page of a report while the
bottom of the footer should show on each page. To accomplish this I created
two regions. The upper region holds the text that should only appear on the
last page and the lower region contains the text that needs to appear on
every page.

In the report.onpagestart event I added the following code

if report.pageno = report.absolutepagecount then begin
region1.visible:= true;
region2.top:= region1.top + region1.height - 0.0104;
end else begin
region1.visible:= False;
region2.top:= region1.top;
end;
footer.height:= region2.top + region2.height;

This code essentially hides the top region for all but the last page. It
adjusts the position of the bottom region accordingly and adjusts the footer
height so that there is no extra space.

The problem is this. I have cases where the detail rows do not completely
fill the page but they do fill enough space that they do not fit if region 1
shows. The calculation above gets confused because if it shows region 1
then the report becomes 2 pages (and region 1 shouldn't show). If it does
not show region 1 then the report fits on one page (and then region 1 should
show).

The end result is that region 1 does show but it cuts off the last 4-5 rows
of my report. Is there a better way to do this so that in this case my
report knows to not show region 1 on the first page but create a second page
where just the header and footer with region 1 shows?

Thanks..

..Joe..

Comments

  • edited December 2005
    Hi Joe,

    Instead of using two regions in the footer band, you could place the upper
    part of your existing footer band inside the summary band and leave the
    lower part where it is. Then set the TppFooterBand.PrintOnLastPage property
    to False preventing the footer band from printing on the last page. You can
    control the vertical position of the summary band using the PrintPosition
    property.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2005
    Hi Nico,

    Our reporting application is a general program and it's source code
    cannot be modified. Therefore, all of our code changes must be done in
    RAP. Can your solution work in RAP? If so, which event would these
    changes go into?

    Thanks..

    ..Joe..

    upper
    property
    can
    PrintPosition
  • edited December 2005
    Hi Joe,

    Are you using a registered version of ReportBuilder or an application with
    ReportBuilder built-in? Which version of ReportBuilder are you using?

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