title: How to remove extra space between textfield in JasperReports?
body: <p>I have created three text field in Header. I have put parameter in all <code>textField</code> elements. When I'm not calling one of three parameter of three <code>textField</code> elements. It will show 2 <code>textField</code> elements. The problem now is there are space between the text fields. </p>
  
  <p>How to remove the space?</p>
  
  <p>This is my code:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;textField isBlankWhenNull="true"&gt;
      &lt;reportElement x="0" y="18" width="555" height="35" isRemoveLineWhenBlank="true"/&gt;
      &lt;textElement textAlignment="Center"&gt;
          &lt;font size="12"/&gt;
      &lt;/textElement&gt;
      &lt;textFieldExpression&gt;&lt;![CDATA[$P{daterangefrom}  &amp;&amp; $P{daterangeto}  ?  "From ( " + $P{daterangefrom} + " - " + $P{daterangeto} + ")"
  : $P{weeks}  &amp;&amp; $P{monthy} &amp;&amp; $P{yrs} ? "For week " + $P{weeks} +" "+ $P{monthy} +" "+ $P{yrs}
  : $P{monthy}  &amp;&amp; $P{yrs} ? "For monthly " +$P{monthy} +" "+ $P{yrs}
  : $P{quarter}  &amp;&amp;  $P{yrs}  ? "For Quarter " + $P{quarter} +" "+$P{yrs}
  : $P{yrs}  ? "For " + $P{yrs}
  : null]]&gt;
      &lt;/textFieldExpression&gt;
  &lt;/textField&gt;
  </code></pre>
  
  <p>This is mine result:</p>
  
  <p><img src="https://i.stack.imgur.com/gpE6j.jpg" alt="enter image description here"></p>