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

blank page at report end

edited January 2010 in End User
I have a report design which produces a blank page at the end of the
report, if I apply no selection criteria. If I select criteria which
report out on less than all the records, then the blank page is not
generated.

The only thing I have found in report code that seems related is this:

procedure GroupFooterBand1BeforePrint;
begin
if Current_Balance['Remainder'] > 0 then
begin
GroupFooterBand1.Visible := True;
Group1.NewPage := True;
end
else
begin
GroupFooterBand1.Visible := False;
Group1.NewPage := False;
end;
end;

The top level of the report is the group. There is nothing in the
design which is in the report header or footer.

Is there, for the report itself, a counterpart to
Group1.NewPage := False?

--

Bill

Comments

  • edited January 2010
    Hi Bill,

    Typically when a blank page is displayed at the end of a report, the report
    engine thinks the report is out of space on the last page and breaks to a
    new one before ending. Try tracing through the event code you have below
    and see if this may be occurring. My initial guess would be that the event
    you are using to hide the group footer and toggle the NewPage property is
    firing too late to have the desired effect.


    I'm a bit unclear about this question. Setting the Group.NewPage property
    simply toggles whether the group will break to a new page after it has
    finished.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2010
    Nico Cizik (Digital Metaphors) wrote:


    OK, I have more on this. It turns out that the last page is not blank,
    but is displaying a footer, but no detail section, because the code
    apparently suppresses that detail. What I do not understand is why the
    code can suppress the detail, but not the footer, and the page. I tried
    relocating the code to suppress the footer to the same event which is
    clearly suppressing the detail section, but still get the footer....

    --

    Bill
  • edited January 2010
    Hi Bill,

    How are you suppressing the detail band? The event code you posted earlier
    will not do that. Is there another event that is hiding the detail
    information based on some condition? If so, try tracing into this code and
    see if the footer band is actually being hidden for the last page.

    If this always occurs, you might try setting the FooterBand.PrintOnLastPage
    property to False and see if that helps.

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