ActiveReports 15 .NET Edition
ActiveReports 15 User Guide / Concepts / Common Concepts / Shrink Text to Fit in a Control
In This Topic
    Shrink Text to Fit in a Control
    In This Topic

    In ActiveReports, when working with the Textbox control in a page report and RDL report or a TextBox or Label control in a section report, you can use the GrapeCity.ActiveReports.PageReportModel.Style.ShrinkToFit property to reduce the size of the text so that it fits within the bounds of the control. The text shrinks at run time, so you can see the reduced font size when you preview, print or export the report.

    The following image illustrates the result when the ShrinkToFit property is set to True on Title.

    Using Shrink Text to Fit in a control

    Using Shrink Text to Fit in a control

    You can use other text formatting properties in combination with the ShrinkToFit property.

    Caution:

    • When both CanGrow and ShrinkToFit are set to True, CanGrow setting is ignored and only ShrinkToFit is applied to the report.
    • When  ShrinkToFit is set to True and Angle is set to a value other than 0, the ShrinkToFit property is ignored.
    • ShrinkToFit property does not work in following conditions:
      • VerticalText property (in Section Report) or WritingMode property (in Page/RDL report) is set for a control.
      • Multiline property in Section report is set to False.
    • Common value with Page number (in data region or report header/footer) appears clipped in exported files (HTML, MHT, Word, and Excel) even when ShrinkToFit property for the TextBox is set to True.

    Export Support

    While exporting a report, various file formats handle ShrinkToFit differently.

    ShrinkToFit gets exported in all formats except Text. While rendering a page report or RDL report using rendering extensions, ShrinkToFit is not supported in XML. However, all other rendering extensions allow ShrinkToFit display as it is. See Rendering Extensions for more on rendering extensions.