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?
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.
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.
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?
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.
Comments
which will print a group header for the orphaned group footer.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
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
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
http://www.digital-metaphors.com
info@digital-metaphors.com
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
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
http://www.digital-metaphors.com
info@digital-metaphors.com