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

Finding Page Number of a Component

edited December 2012 in General
Hello

Using RBE v11 Is there any way to determine the page number that a
component has appeared on at runtime.

I'm using a two pass report and I need some components in the page
footer to be hidden if a certain region has appeared on the page - but
be visible otherwise.

Many thanks in advance

Rod North
First Degree Systems

Comments

  • edited December 2012
    Hi Rod,

    You could use the OnPrint event of a component to determine which page
    it is being printed by checking the Report.AbsolutePageNo property.

    It however could be tricky to get the timing right to actually toggle
    the visibility of other components based on this information. Once the
    OnPrint of a component is fired, it is likely too late to alter the
    visibility of other components inside the same band. You might consider
    using a two pass report and compiling a list of pages during the first
    pass and toggling the visibility based on that list during the second.

    if Report.FirstPass then...

    if Report.SecondPass then...

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.