eyvind.almqvist Posted September 4, 2023 Share Posted September 4, 2023 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 More sharing options...
jgust Posted September 5, 2023 Share Posted September 5, 2023 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 More sharing options...
Rutuja Bhalchandra Shinde Posted September 5, 2023 Share Posted September 5, 2023 Hi,The "stretch with overflow" property is deprecated and no longer used in JSS, This property is replaced by the Text Adjust.Please refer to the below documentation it may help you to resolve the issue :https://jasperreports.sourceforge.net/schema.reference.html#textFieldThank you! Link to comment Share on other sites More sharing options...
eyvind.almqvist Posted September 6, 2023 Author Share Posted September 6, 2023 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 More sharing options...
eyvind.almqvist Posted September 6, 2023 Author Share Posted September 6, 2023 Thanks, I solved this Link to comment Share on other sites More sharing options...
eyvind.almqvist Posted September 8, 2023 Author Share Posted September 8, 2023 It is like Jgust said.Each textfield must to be in a "Group header-band". Choose create group. Then create the group header, but not the group footer. Then put a textfield inside the group header. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now