I am going through a datatable inserting rows into a pdf but have a problem trying to make fields that is LONG fit in.
I create a record area, (Width of one line of text) and a field (The width I EXCPECT the field size to be) BUT the field then returns from the Datatable and is 4 times or more the size I can fit into the area for it.
My questions is, is there a auto line feed kind of property/method/function that can be used so the it will write the text field to a label (OR maybe to something other than a label field?) which will keep the width given, but will write down adding lines to fit all teh text into it?
PLEASE.. This is pretty urgent.
I did write a method to do a line feed as well as determining how many rows the text area/label should be. BUT it is messy BIG and I would like to NOT use it on each and every field I return as it will make the rest of my code very hard to read. Yes it is in a seperate method, but still .. THANKS.
Line feed in a label OR?
Re: Line feed in a label OR?
Support · Sep 3, 2008Hello,
There is no inbuilt functionality in the ReportWriter product that will create Auto line feed for ou. However, if the size of the RecordArea is big enough and the contents do not fit on one line, then it will cause the line to break and continue on the second line.
This can be done in a simpler way using the TextArea page element of the Generator for .NET product. You can set the initial height of the TextArea to be 10 for e.g. Then add text to the TextArea. Then reset the height of the TextArea based on the height required to fit the text you provided. Get the required height to fit the text using the GetRequiredHeight() method of the TextArea page element. Then reset the TextArea height equal to the value returned by GetRequiredHeight() method and that will solve your problem.
Thanks,
ceTe Software Support Team