Home Subreports

Page numbering

edited July 2003 in Subreports
Hello,
I use RB 6.03, D6.
I have a main report with it's pipeline.
on the detail band of that report there are 6 sub reports.
The main pipeline traverses the entire organization data.
For every department there is a header page and 6 sub reports. The page
numbering for every group should print as an independent subset as follows:
Header page for dep 1 (Page 1/10)
rep 1 for dep 1 (Page 2/10)
rep 2 for dep 1 (Page 3/10)
...
rep 6 for dep 1 (Page 10/10)
---
Header page for dep 2 (Page 1/12)
rep 1 for dep 2 (Page 2/12)
rep 2 for dep 2 (Page 3/12)
...
rep 6 for dep 2 (Page 12/12)

In order to achieve that I have a group in the main report that breaks on
the departments.
The group header prints the header for every department.
The group is set with StartNewPage=true and ResetPageNo=true.
The main report is set to TwoPasses.
The subreports are section reports, and do NOT reset page numbers.
All is well apart from the page numbering.
I have the page numbers printed without resetting for each group, as:
1/520
2/520
...
520/520

Comments

  • edited July 2003
    The group should reset the page numbers, not the subreports, as you have
    described, but section style subreports are fully embedded reports and take
    control over pagination (as you can see the main header and footer are not
    printed in section subreports). The solution is to use a TppVariable or
    TppLabel and code it to display the page numbering based on the
    TppGroup.AfterGroupBreak event. Use the object inspector to access the
    TppGroup object and assign the AfterGroupBreak event to be able to reset the
    custom page numbering manually.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited July 2003
    Thanks Jim,
    I understand how to count the group pages, but how to control the total page
    count for every group ?

    I have another problem with a similar report that has only a detail band and
    some sub reports on that band.
    The is displayed with a leading blank page that shouldn't be there.

    bye
    Israel


  • edited July 2003
    If you can count the group pages, then that should be all you need to
    control this. Display the page count using a variable, not a system
    variable.

    A section style subreport always generates on its own page, which means that
    it can't generate on the first page. What you can do is use a child type
    subreport for the first subreport and the subsequent subreports are section
    style subreports. Place the child subreport in the bottom of the header band
    of the main report. Then when the detail of the main report begins printing,
    its first component to print is the first section style subreport.

    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.