DBMemo in FooterBand
I must print in the footerband, not in the summary band, a strechting
DBMemo. How can I do this, because the footer is stattic? The example
http://www.digital-metaphors.com/tips/AlignMemoToBottom.zip does not help.
Maybe i can calculate the height of the memo for setting the Footer.Height?
Any ideas?
Thanks in advance,
Juergen
DBMemo. How can I do this, because the footer is stattic? The example
http://www.digital-metaphors.com/tips/AlignMemoToBottom.zip does not help.
Maybe i can calculate the height of the memo for setting the Footer.Height?
Any ideas?
Thanks in advance,
Juergen
This discussion has been closed.
Comments
them down to the bottom of the page. One additional part that I overlooked
was that you need to force the engine to stop generating detail bands when
the space used is going to run into the "footer." I might be able to put
together a demo of this.
Since the footer is always static height, your only other option is to
generate the memo and calculate its height before the footerband gets a
chance to generate. TppCustomMemo.CalcSpaceUsed is the method that you need
to look for in ppMemo.pas. The code in that routine shows how to calculate
the height of the memo. Before the page generates (Report.OnStartPage
event), you can calculate and set the footerband height and let the detail
bands generate normally.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
is there no other solution?
Is it possible to start the generation-process of the memo or the band that
contains the memo manually to get the SpaceUsed-value and after this to
cancel the generation.
Or is it possible to print the memo eg. at x,y = (-1000,-1000) and then
repaet the printing at the "right" position?
Thanks for your help
Juergen
However, it is possible to come up with an approach to make it appear to
work this way since RB is so wonderfully flexible. You could generate the
memo in memory (not a device) to calculate the height that it would need to
take up in the Report.OnStartPage event. Then set the footer band height in
this event so that the detail bands won't generate into the footer band's
space. This would be the best solution.
"Since the footer is always static height, your only other option is to
generate the memo and calculate its height before the footerband gets a
chance to generate. TppCustomMemo.CalcSpaceUsed is the method that you need
to look for in ppMemo.pas. The code in that routine shows how to calculate
the height of the memo. Before the page generates (Report.OnStartPage
event), you can calculate and set the footerband height and let the detail
bands generate normally."
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
yourself without displaying it on any output device. The code to do this is
located in ppMemo.pas in TppCustomMemo.CalcSpaceUsed. Take this code, put
it in your and figure out how much space the memo will need to generate.
Then you can set the footer band's height and let the report engine generate
the text into the static height memo (with the correct calculated static
height). For reference, the method TppPlainText.WordWrap is located in
ppPlainText.pas.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com