Suppressing PageHeader on first page of new Group

Posted by: iandavo on 4 August 2017, 3:20 pm EST

  • Posted 4 August 2017, 3:20 pm EST

    I have an unbound report loaded from an rpx file, and using VBScript. The report is a debtor batch invoice print run, with one to several pages per customer, depending on the number of invoices. The first page for each debtor displays company heading, logo,  customer name and address etc. For this I use a Group Header. Below this the Detail section itemises all the invoices, with one to several lines per invoice. A Group Footer with PrintAtBottom = True and NewPage = 2 - ddNPAfter, gives the debtor batch invoice total and remittance details at the bottom of the last page for that debtor. On a PageHeader section I have the company name, Customer Name, invoice number and Group-based Page number (ie resets for each debtor Group). The PageHeader should be suppressed for the first page for each Group. I managed to get this working after a fashion at one stage, but there were two issues that I've been struggling with for days:

    1) How can I suppress the PageHeader on the first page for each debtor? Because the PageHeader.Format event occurs before the GroupHeader.Format event it's already been rendered before I know there's a new Group. Thus it's too late to set PageHeader.Visible=False there. I also can't utilise the FetchData event for this purpose for the same reason as below - it's too early if the Group is straddling a page.

    2) If the very last invoice for a debtor spans a page or forces the Group Footer to a new page, AND the recordsource .eof has not yet been reached, the GroupFooter.Format event has already fired before the PageEnd/PageStart events that straddle the page break, so it's too early to set the PageHeader.Visible=False there because then it won't print on the GroupFooter page. Interestingly, this is not a problem if the last Detail record does not force a page break.

    Thanks for any assistance!

  • Replied 4 August 2017, 3:20 pm EST


    It would not be possible to hide the page header depending on a Group as the Groups are not page aware.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels