Textbox text overflow
I have an SSRS Report that has text in a textbox of fixed size. I need to figure out how much text can fit in that textbox and put the rest of the text that didn't fix into another textbox. I've been using System.Drawing.Graphics.MeasureString to attempt to calculate how much text should fit in the first textbox but it's been very difficult and only close at best. I can't use a fixed width font and the textbox cannot be allowed to grow or shrink to fit the text. Is there any way to use the size of the textbox (measured in inches) to figure out exactly how much text will be rendered in that textbox when outputting a PDF? Surely the rendering engine is calculating how much text to display; I'd like to be able to perform that same calculation on my own. Thanks in advance.
July 19th, 2011 11:47am

The max length of a textbox (all characters in one textbox) is 32000 characters. It is already posted in the following reference... http://social.msdn.microsoft.com/Forums/is/sqlreportingservices/thread/4698492d-7f64-4a90-b7f6-9100ef230c42 Pls mark as answer, if this helps...- Kerobin
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2011 3:42am

Thanks for the reply. I'm not trying to figure out the max length of the textbox object. I have a textbox that is of fixed size and the text that is to be displayed in that textbox requires more space than the size of the textbox. I need the text that does not fit into the fixed sized textbox to continue in a second textbox. Example: textbox1 has a size of 5in, 6in and CANNOT increase to accommodate contents textbox2 has a size of 8in, 10in and can increase size to accommodate contents Now let's suppose I have a very long string to display on this report. I need to figure out how much of that string can fit into textbox1. Whatever doesn't fit in textbox1, I would like to display in textbox2.
July 21st, 2011 11:19am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics