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

Font Size of TppCustomText Objects

edited December 2011 in General
Hello,

Can you recommend a method of adjusting the font size of the Text fields of
a report from a calling procedure.

I have a generic grid report called from several places in a project. In
certain instances, the design time font size of the objects in the template
leaves the fields crowded or overlapping. I am trying to find the most
practical way of iterating through the text fields of the existing report
and reducing the font size at runtime.

Would it be possible to associate a beforeprint event handler with each of
the objects before the report prints? I've tried referencing each of the
bands and their objects and assigning a font size to no avail.

Thank you for your input,
Mike Malinowski
Programmer
PRG LLC

Comments

  • edited December 2011

    Here is an rbWiki example that shows how to iterate over the
    Report.Bands[ ].Objects[ ] in code and apply a font. You could use the
    Report.BeforePrint event or perhaps the Report.Template.OnLoadEnd event if
    you are loading reports from templates files or a database,

    http://www.digital-metaphors.com/rbWiki/Delphi_Code/Layouts/Report_Object_Loop

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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.