Home General

Label Visible vs. Height

edited June 2011 in General
Hello,

I am upgrading a Delphi project which uses Reportbuilder reports. The height
property of a pplabel on a report was set to zero in order to suppress the
label. In RB12 the same call sets the height to zero but the label is still
visible. Any ideas?

Thank you,
Mike Malinowski

Comments

  • edited June 2011

    When AutoSize is True, the Height is calculated based upon the Font. This
    enhancement was made based on customer feedback. Customers repeatedly
    reported bugs with Labels and DBText not printing correctly.

    As you mention, the correct way to suppress a Label is to set the Visible
    property to False.

    If you set Height to 0, you also need to set AutoSize to False.

    If you have hundreds of old reports that use that technique of setting the
    Height and do not want to change them, you could change the source code
    located in ppCtrls.pas, the method TppCustomText.CalcSpaceUsed


    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited June 2011
    Thank you very much for the detailed reply and the suggested workaround
    Mike.
This discussion has been closed.