locked
Change Font Size Dynamically RRS feed

  • Question

  • Dear All 

    I need to change the font size of specific cell in a table depending on the length of the text that if i have long string that will have to be divided into two or more line then font should reduced automatically to fit the size of the cell.

    i hope i could delivered a good image of what i need

    thanks and best regrds

    Amir Samir

    Wednesday, April 28, 2010 1:56 PM

Answers

  • Select the textbox and go the the Properties.

    Expand the Font Property

    Select Font Size - > Expression and give like

    =IIF(len(Fields!Desc)>10,"10Pt","15pt")

     

    • Proposed as answer by Eric Hilton Wednesday, April 28, 2010 3:18 PM
    • Marked as answer by Challen Fu Wednesday, May 5, 2010 1:40 AM
    Wednesday, April 28, 2010 2:02 PM
  • Hi amir_samir,

    From your description of the requirement, you want to change the font size to fit the cell when the string is too long.Suresh gave the correct expression. Beside this method ,you can still change the value of the padding in property window.You can reset the value to 0pt.

    Hope this helpful.

    Regards,

    Challen Foo

    • Marked as answer by Challen Fu Wednesday, May 5, 2010 1:41 AM
    Monday, May 3, 2010 3:02 AM

All replies

  • Select the textbox and go the the Properties.

    Expand the Font Property

    Select Font Size - > Expression and give like

    =IIF(len(Fields!Desc)>10,"10Pt","15pt")

     

    • Proposed as answer by Eric Hilton Wednesday, April 28, 2010 3:18 PM
    • Marked as answer by Challen Fu Wednesday, May 5, 2010 1:40 AM
    Wednesday, April 28, 2010 2:02 PM
  • Hi amir_samir,

    From your description of the requirement, you want to change the font size to fit the cell when the string is too long.Suresh gave the correct expression. Beside this method ,you can still change the value of the padding in property window.You can reset the value to 0pt.

    Hope this helpful.

    Regards,

    Challen Foo

    • Marked as answer by Challen Fu Wednesday, May 5, 2010 1:41 AM
    Monday, May 3, 2010 3:02 AM