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

TppRichtext overwriting page footer

edited April 2002 in General
I have a problem with a report: sometimes the contents of a TppRichText
component overwrites the page footer rather than breaking the page where
needed.

The report has a header and footer, the detail contains two pbChild
subreports the second of which contains the TppRichText control before
other memo and region components. The contents of the TppRichText is set in
the BeforePrint event of the detail section of the subreport. And the
attributes of the text, e.g. font and size is also set here. The text is
actually a single line of varied font but I am using richtext to format the
layout rather than have separate label components and mess with calculating
the length each time and adjusting position. Perhaps this adjustment to
content is causing the problem, but most of the time the report break breaks
correctly.

Any suggestions? I am even at a loss how to investigate it.

The report itself is quite diverse and complex. It is based on a number of
non-related parameterised queries, with additional database queries being
performed from GetMemo and GetText events to lookup other information. The
content of the report is too diverse to fit any simple master/detail model.

Sorry so hard to describe, but hope you can make sense of it. Basically I
have overflowing richtext.

Sarah

Comments

  • edited April 2002
    Can you please send a sample project with the rtf that reproduces the
    problem to support@digital-metaphors.com.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited April 2002
    I had a horrible feeling you would ask that. Unfortunately I have not
    managed to repeat the problem in a simple project, and my actual project is
    far too involved, so is the report really.

    The good news is that I managed to prevent the overflow of text onto the
    footer by putting the TppRichText component in a region with keeptogether =
    true.

    All I can tell you is that in certain circumstances there is an overwriting
    problem that using a region fixes. If I do manage to make a simple example
    then I will pass it on.

    Thanks

    Sarah

    "Alexander Kramnik (Digital Metaphors)" wrote
  • edited April 2002
    Sample project sent as requested. This shows Richtext overwriting footer,
    and Shift Relative To of an adjacent memo field not working either.

    I am sure the problem stems from the way I modify the RichText in the
    BeforePrint of the band. Is there some other event I could put this in, or
    some size setting I can do to overcome the overwriting?

    Suggestions?

    Sarah

    "Alexander Kramnik (Digital Metaphors)" wrote
  • edited April 2002
    Keeping the NG uptodate. DM have confirmed this is a bug. Alex says

    "It seems that when there is only one like of text, the RichText component's
    overflow of it's parent is not being handled properly. Thanks for bringing
    this to our attention. We'll work to get a patch out as soon as we can."

    Thanks Alex. Will you let me know if you get anywhere?

    Sarah
  • edited May 2002
    The problem arises when there is only one line of text with multiple fonts
    scattered throughout. The RB RichText renderer relies on the Windows
    Richtext renderer to wrap, measure, and fit the RichText. It seems that in
    this situation only the font size of the last character is considered. So if
    the font size of the last character is not the largest of all existant fonts
    the text will overflow its parent because larger fonts are present.

    A temporary workaround is to either simply avoid the situation by avoiding
    the setup descrived above (making sure that if only one line of text is
    present, the font size of the last character is the largest one) or setting
    a large enough bottom offset for the parent object containing the richtext
    (i.e. a region component.)

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

This discussion has been closed.