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

Bug in previewing memo fields?

edited October 2005 in General
Hello,
Using RB9.02 with Delphi 7.
I have been getting errors in RB when trying to preview one of my reports.
Error is a list index out of bounds on a TStringList. I tracked i down to
the fact that when printing a memo component that has no lines (procedure
TppScreenDevice.DrawStandardText), RB somehow determines that the lines
don't fit into the control and so set the line count to a denominator of the
line height and the size of the memo.

Changing the line:
lbLinesFit := liLineHeight <= Trunc((lDrawRect.Bottom -
lDrawRect.Top) / aDrawText.WrappedText.Count);
to
lbLinesFit := (aDrawText.WrappedText.Count = 0) or (liLineHeight
<= Trunc((lDrawRect.Bottom - lDrawRect.Top) / aDrawText.WrappedText.Count));

seems to fix the probelm. Is this a valid change?

Regards,
Gilbert

Comments

  • edited October 2005
    Hi Gilbert,

    There is currently a patch available for this issue (similar to the fix you
    made). If you would like the patch, please send a small email requesting it
    to support@digital-metaphors.com and we'll send it to you asap.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2005
    Nico,
    Thanks, but i think i will wait 'till v9.03 as the problem seems to be
    sorted on this side.
    Gilbert


This discussion has been closed.