Jump to content
Changes to the Jaspersoft community edition download ×

Unwanted wordwrap on single line textfield


2004 IR Help

Recommended Posts

By: wlehmann - wlehmann

Unwanted wordwrap on single line textfield

2005-07-23 07:58

In a table report layout I have a row of single line textfields which make up the detail band. If the text for any one textfield gets too long to display in a single line JR wordwraps it (apparently) because it is cut off at the first space. The result is a half-empty text field with half of the text missing. This is for both pdf and xls export.

 

How can I avoid this wordwrap, I'd rather have a cut-off at the field boundaries?

 

I have experimented with the option stretch-with-overflow. If I use this on all the textfields the rows become taller when needed. However, if there is one of the textfields which needs stretching, and this is on the last row of a page, only this one textfield stretches to the next page, not the other textfields in the same row. Which looks quite ugly on this next page with grid lines missing on all columns but the one stretched over to this page (for the first row on the page).

 

I think this same problem was also mentioned here, but there did not seem to be solution?

 

https://sourceforge.net/forum/message.php?msg_id=3173187

 

Right now I am between scylla and charibdis: without stretch half the text is missing (and the report should be one-lined as per spec) and with stretch occasionally the strechted-to-next-page row looks ugly...

 

Please advise.

 

 

 

 

By: wlehmann - wlehmann

RE: Unwanted wordwrap on single line textfiel

2005-07-23 10:35

Ok, I have discovered that I can avoid charibdis by enabling the option "Print When Detail Overflows" on the textfields of the detail band. With this option the behaviour is as follows:

 

"If a textfield overflows in the last row of a page and stretches over to the next page the other textfields in the same row are repeated in the first row of the next page."

 

This is better because it keeps the grid intact. But it is not really good because the non-stretched data is repeated! There is not an empty grid cell but the whole data appears again. This makes it *very hard* for the user to recognize that this row just stretched to the next page. He can confuse it with a completely new row very easily.

 

Any ideas on that?

 

 

 

 

By: C-Box - c-box

RE: Unwanted wordwrap on single line textfiel

2005-07-24 23:03

Hi,

 

Perhaps Teodor changes the way textfields are chopped by a parameter "ChopAfterFirstSeparator" or "ChopNothingUseElementWidth" ... that is not to difficult I guess (IMHO)... make a feature request towards this. I remember another suggestion by someone who wanted "abcde ..." displayed although the real string is "abcdefghijklmn" so he wanted to add "..." at the end of the letters that fit into the given width.

 

and did you already tried to set the stretchtype for your fields to "RelativeToTallestObject" or even "RelativeToBandHeight"...... perhaps this solves the problem of your missing lines at page two without repeating the values again!??!?!?!?

 

hth

C-Box

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...