title: How to achieve dynamic detail band height (depending on text length)?
body: <p>I'm having some trouble trying to find the solution for this.</p>
  <p>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.</p>
  <p>This subreport has just a <strong>textfield</strong>, in which the name and surnames are imported from the <em>Java</em> code.</p>
  <p>The problem is that whenever the name and surnames are too long to be printed in a single line, I must finish printing them in a second one.</p>
  <p>I tried two approaches to solve this (please ignore other fields, <em>nameAndSurname</em> is the relevant one):</p>
  <p><strong>1.</strong> <strong>Single detail band with a proper height for two lines.</strong></p>
  <p><a href="https://i.stack.imgur.com/jzubC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jzubC.png" alt="One line" /></a></p>
  <p><strong>2.</strong> <strong>Double detail bands</strong>. By <em>Java</em> code, I cut the second surname and import it to the second name and surname field. The second detail only prints when the condition (<code>nameAndSurnameTwo!=null</code>) is true.</p>
  <p><a href="https://i.stack.imgur.com/6A6KB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6A6KB.png" alt="enter image description here" /></a></p>
  <hr />
  <p>I couldn't get a solution for this yet. The problem is, the detail band keeps taking the second-line space whether it prints the second line or not.</p>
  <p>In the 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 lengths of the name and surname are too long, it must take up two line spaces.</p>