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

orphan footer

edited November 2001 in General
Hi All

Anybody knows, how to prohibit group footer to be printed alone on the next
page?
I need at least 1 detail row before it.
Is there some simple way to do this?

Thanks

Michael

Comments

  • edited November 2001
    There is a property on the group object, called HeaderForOrphanedFooter
    which will print a group header for the orphaned group footer.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited November 2001
    Thank you, Jim
    But, I need at least one detail row before footer. Header doesn't matter.
    Groups can be so large, that they cannot fit on one page, so
    KeepGroupTogether
    is not a solution, and HeaderForOrphanedFooter too.

    Do you have any idea?

    Regards
    Michael

  • edited November 2001
    Here is an example you can download (RB 6.03 for Delphi 6 format). This
    demo forces the last detail band on a page to print on the next page, when
    the group is going to orphan the footer. Then assumption is that the detail
    band is static height so that this can be calculated before the detail band
    prints.

    http://www.digital-metaphors.com/tips/DetailForOrphanedGroupFooter.zip


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited November 2001
    Thanks, Jim
    I will try to think that way. But, as usual, everything is not so good - I
    have dynamic
    detail band height :-)
    How can I calculate dynamic band height in BeforePrint? It is unknow at the
    moment of execution of this method, isn't it?
    May be, there is another handler, where height is already known, but band
    has not been printed yet?

    Regards
    Michael

  • edited November 2001
    The height of a dynamic height detail band is only known after it has
    generated for the page. You will have to emulate the engine and generate
    the band yourself, in order to calculate its height before the report engine
    does. If you have a stretching memo, you will have to use the
    Report.Printer.Canvas to measure the text height of the text which is going
    to be printed in the available space and wrap the text. See the ppPlainText
    unit for the word wrapping logic. You should be able to call its WordWrap
    procedure to do this.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited November 2001

This discussion has been closed.