Microsoft ReportViewer : Auto-Sizing Fonts for values in a textbox RRS feed

  • Question

  • Hi,

    I am designing a RDLC report in WPF.

    Naturally I am using WindowsFormsHost to host a ReportViewer(version: object to display the report.
    However, since the length of the value varies each time, some values can't be shown in a textbox whose size and fontsize properties have been set in a rdlc file.
    I'd like to perform decreasing fontsize points automatically to fit a value in a single cell if the value is too big to be shown in a cell with the default fontsize, as like one of Excel functions would do.

    There are 2 things i have as questions related to this topic.
    1. Are there any properties or settings to resize fonts automatically depending on the size of the value set in a textbox cell?
    2. if the answer for 1 is no, how do I accomplish that?Do I get to set a formula for fontsize property?

    For example,
    if I set properties of a text box in a condition below.
    size : "1.3 cm, 0.5 cm"
    fontsize : "6.5 pt"

    then if the value, which is a number, is supposed to be set in the textbox is more than 20 digits,
    I want the font size will be decreased from 6.5pt as much as it is possible till the whole value will be shown in a cell without a new line.

    Any help will be appreciated.


    • Edited by justStartedWpf Thursday, October 15, 2015 6:24 AM
    • Moved by CoolDadTx Thursday, October 15, 2015 3:17 PM Reporting related
    Thursday, October 15, 2015 5:58 AM