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

The pagenumber of a subreport

edited August 2004 in Subreports
Hi 2 all,

how can I get the pagenumber on which a subreport is placed on printing.

Thank you for a quick answer,


--
Dank Operas revolutionärem E-Mail-Programm M2: http://www.opera.com/m2/

Comments

  • edited August 2004

    Try myReport.AbsolutePageNo.

    If that does not help, provide more details on what you are trying to
    accomplish.


    --
    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited August 2004
    Hi,
    my report contain some subreports. On designtime i do not know on which
    page they will apear. Because there are tables in many of the supreports
    which can be 2 rows long or 200 rows long. After printing subreport_1 RB
    will print subreport_2. If subreport_1 is very small subreport_2 will be
    placed on page1. If subreport_1 is very large subreport_2 will be placed
    on page 2 (or 3). So there must be an event (while printing) that can tell
    me on which page the subreport_2 is placed (the begin off..) for example.

    What I am trying to do is a simple "Table of contents" with page numbers
    for each subreport.

    Thanks for answer,
    Stephan Spies
    http://www.logispro.de


    Am Mon, 9 Aug 2004 09:08:45 -0600 schrieb Nard Moseley (Digital Metaphors)
  • edited August 2004

    The following example implements a table of contents. A subreport containing
    a memo is used to display the table of contents on the first page. The
    Report.PassSetting is set to psTwoPass. During the first pass, the memo is
    loaded with the table of contents info.

    www.digital-metaphors.com/tips/TableOfContents.zip


    --


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited August 2004
    Hi,

    first of all, thanks for your answer.

    But I do not have any goups to add such an event.
    I just have subreports. Where can I add instead of this the event like
    "AfterGroupBreak".
    The reason for that is, that some subreports can be hidden, or can be
    longer, so all of the following subreprots will be printed one page later.
    I just have to know for the TOC on which page of the report the subreport
    starts.

    Thanks for your answer,

    Stephan

    Am Tue, 10 Aug 2004 09:50:50 -0600 schrieb Nard Moseley (Digital
  • edited August 2004

    Try using the ChildReport OnStartFirstPass event, this event will fire each
    time the childreport generates. (There is also an OnStartPage event, but
    this fires each time the subreport generates a page).

    At Delphi design-time, access the workspace for the subreport. The
    childreport object will become selected in the object inspector. Select the
    events tab of the object inspector adn you will see the childreport events.


    --

    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.