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

TppPageBreak & Z-Order

edited January 2006 in General
Hi,

I am generating a report @ runtime from code using TppLabel, TppShape &
TppPageBreak. The report is not linked to a datapipeline.

The controls are written to the detail band which stretches to accomodate
the controls. At certain points, a TppPageBreak is inserted. After each
control is inserted a PageY parameter is incremented by the height of the
last inserted component.

Controls that are added after the page break do reliably move to the right
location on the new page. For example, after the first page break, all of
the controls inserted do not start at the top of the new page. So, if a
page break was not inserted, a certain label's Y posn would be 190mm from
the top of the page. With the page break, the label is located 190mm from
the top of the new page. Successive page breaks work OK but all of the
TppShapes are put on the first page.

The help file refers to the "Z-Order" in relation to the TppPageBreak
component but there is no other mention of it.

So, basically my question is: How do I insert controls relative to the
last TppPageBreak?

Thanks, and sorry for the verbose question ;-)



--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited January 2006
    Hi Steve,

    PageBreaks can be visually confusing because they occur according to the
    z-order (or the order in which items were created in a band). Once a page
    break occurs, the next components in the z-order will print as if they were
    on a new page. If you would like to position components relative to the
    actual TppPageBreak object, you will need to do so starting at the
    TppPageBreak.Top value. For instance, if you would like the next label
    printed after the page break to appear 10 pixels below the pagebreak itself
    you would need to set its Top propery to 10 pixels more than the top of the
    PageBreak component.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

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