I'm having some trouble trying to find the solution for this.
In my report, I have a subreport whose function is to print the name and surnames of the people related to the document I'm printing.
This subreport has just a textfield, in which the name and surnames are imported from the Java code.
The problem is that whenever the name and surnames are too long to be printed in a single line, I must finish to print them in a second one.
I tried two approaches to solve this (please ignore other fields, nameAndSurname is the relevant one):
1. Single detail band with a proper height for two lines.
2. Double detail bands. By Java code, I cut the second surname and import it to the second name and surname field. The second detail only prints when the condition (nameAndSurnameTwo!=null
) is true.
I couldn't get a solution for this yet. The problem is, the detail band keeps taking the second line space wheter it prints the second line or not.
In resume, what I need is a band that dynamically changes its height depending on the length of the name and surname I must print. If these are short, just a line. Only if the length of the name and surname are too long, it must take up two line space.