Dynamic text field resize

0
Facing an issue with dynamic textfield resize. To accomodate a large string we have to make the text box large enough so that data does not get truncated but when the datais small, it takes up entire text box area and creates blank spaces around.
Please let me know what am I missing, as there should be a way around it given such a common requirement.
rsharma's picture
Joined: Aug 27 2007 - 12:02am
Last seen: 11 years 6 months ago

9 Answers:

0
You can set the textfield to a reasonable size then set the property "Stretch with overflow". The field will then expand vertical so that it will contain all of your text.
svenn's picture
1345
Joined: Mar 19 2007 - 5:57am
Last seen: 12 years 4 days ago
0
can i do it somehow horizontal? I mean to have not such text:
------------
simple text|
to display |
vertical |
------------



but

----------------------------------
simple text to display horizontal|
----------------------------------
yurish's picture
38
Joined: Aug 20 2007 - 12:26am
Last seen: 11 years 7 months ago
0
Hi yurish!

I have the same problem. Is there a way to specify the text field width in a percentage unit? This could solve the expantion problem, but i don't know if this is posible.

Regards
goku2's picture
2
Joined: Nov 25 2007 - 10:22pm
Last seen: 11 years 3 months ago
0
No you cannot dynamically change the horizontal spacing. The only way you could do it is manually build the whole report. You could then calculate how big you wanted the text field to be.

It is one of the limitations of iReports.
svenn's picture
1345
Joined: Mar 19 2007 - 5:57am
Last seen: 12 years 4 days ago
0

Hi,

You can do one thing to resize dynamic field. open text field expression write as following "Include content"+ ${parameterName}.



Post Edited by venkat562 at 05/31/2011 15:11
venkat562's picture
Joined: May 31 2011 - 4:57am
Last seen: 7 years 9 months ago
0

Hi,

Thanks your idea, but what a pity, it does not work. I don't know whether I did't understand what your meaning is.

Thanks.

smileyang's picture
Joined: May 19 2011 - 12:25am
Last seen: 7 years 10 months ago
0

venkat562
Wrote:
 

Hi,

You can do one thing to resize dynamic field. open text field expression write as following "Include content"+ ${parameterName}.



Post Edited by venkat562 at 05/31/2011 15:11

Hi,

Thanks your idea, but what a pity, it does not work. I don't know whether I did't understand what your meaning is.

Thanks.

smileyang's picture
Joined: May 19 2011 - 12:25am
Last seen: 7 years 10 months ago
0

@smileyang:

First tell me what do you need and what you tried out ?

venkat562's picture
Joined: May 31 2011 - 4:57am
Last seen: 7 years 9 months ago
2

Suppose we have text as "Print this whole sentence in horizontal line". We have text box with stretch overflow option "yes" i.e checked.

If we print it comes like

---------------

print this whole

sentence in

horizontal line

-----------------------

But we have to print in single line like

-------------------------------------------------------

print this whole sentence in horizontal line

----------------------------------------------------------

The whole idea what we are looking for is, depends upon the maximum length of text (dyamic), the text box width should increase at max.

 

prethesh's picture
Joined: Nov 28 2010 - 8:39pm
Last seen: 3 years 9 months ago
Feedback
randomness