Jump to content
We've recently updated our Privacy Statement, available here ×

How to set the height of the textfields according to the content of the text so textfields below are not written over?


eyvind.almqvist

Recommended Posts

I need to set the height of the textfields according to the content of the text, so they don't write over the textfields below. There are 3 textfields in my example; "name", "street" and "zipcode_and city". The streetnames can be very long in China and Japan. Then this problem occurs.
I have used the test text "Box 
1234512345123451....." for the street name. The "zipcode_and city" textfield is written over by this text as my attached picture shows. 

How can I set the height of the textfields according to the content of the text so the textfields below are not written over?
I have tried suggested solutions for this from this forum, like setting "text adjust" to "stretchheight", "position type" to "float", "stretch type" to "relativeToTallestObject",
It is also suggested to check the checkbox "stretch with overflow", but no such checkbox exists. I have JasperSoft Studio 6.20.

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

I don't believe there is a way to determine height based on content.

When I was making statements/invoices for customers in Asia and Europe I would put the address in multiple bands due to the issue you are running into.  To do that I would make sure NOT to use the page header but instead use a group header to display the address.  With the address in the group header, you can have multiple bands each one displaying an address part.

GH_1a (name)
GH_1b (street)
GH_1c (city, principal  subdivision)
GH_1d (country)

If the address belongs to the same country that is sending the document then you can suppress that band.

Link to comment
Share on other sites

I followed the instructions from "rushinde", but it did not solve the issue. The only property related to this in the Textfield documentation link is "textAdjust". That was already  set to "StretchHeight", so the information in the documentation did not help. I also tested different stretch types on "appearance". So I believe that "jgust" is correct, that it can not be solved in an easy way. Is it a bug in JasperSoft Studio, which makes this simple issue to difficult to solve?  

Link to comment
Share on other sites

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...