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

Hide the Header if there are no detail records on the page?

Hi Guys,
Sometimes the Fixed Summary section is too large to fit in what is left of the page so it goes onto the next page.
Unfortunately the Header also prints even thought there are no detail records.
Can I turn the Header off if there are no Detail records on the page?

Regards & TIA,
Ian

Comments

  • Hi Ian,

    Try using the DataPipeline.EOF property to determine whether data traversal has ended, then hide the header in the StartPage event. In my testing with the following code, I was able to get the effect you are after.
    procedure TForm1.ppReport1StartPage(Sender: TObject);
    begin
    ppHeaderBand1.Visible := not(ppReport1.DataPipeline.EOF);

    end;
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • Tks Nico,
    I put the following in..
    procedure ReportOnStartPage;
    begin
    Header.Visible := not(Report.DataPipeline.EOF);
    end;

    Works perfectly.
    Thank you,
    Ian
Sign In or Register to comment.