Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to auto reduce font size if it is too long over fixed textbox in rdlc report

My textbox have a some properties like these

   txtBox.Cangrow = False

   txtBox.CanShrink = False

   Uncheck allow height to increase and decrease.

This textbox use for display value which receive from dataset. Sometime data is too long. So I need to know How to automatically decrease font size for matching with width of textbox?

like image 474
Fame th Avatar asked Sep 14 '15 07:09

Fame th


1 Answers

You'll need to manually determine which font sizes are required for stings of a certain length. You can then put an expression in the Font -> FontSize property as follows

=iif(len(Fields!myString.Value) > 20, "8pt", "10pt")

It's not possible to dynamically shrink the text to fit the textbox.

like image 131
Jonnus Avatar answered Oct 04 '22 20:10

Jonnus