title: Dynamically adding textField in JasperReports
body: <p>Is there a way to dynamically add textFields to the columnFooter in a Jasper Report.</p>
  
  <p>I have situation where I might have to use:</p>
  
  <pre><code>  &lt;columnFooter&gt;
        &lt;band height="21" splitType="Stretch"&gt;
          &lt;textField isStretchWithOverflow="true"&gt;
              &lt;reportElement x="0" y="0" width="50" height="21"/&gt;
              &lt;textElement textAlignment="Center" verticalAlignment="Middle"/&gt;
              &lt;textFieldExpression&gt;&lt;![CDATA["Example text...."]]&gt;&lt;/textFieldExpression&gt;
          &lt;/textField&gt;
        &lt;/band&gt;
  </code></pre>
  
  <p></p>
  
  <p>or</p>
  
  <pre><code>      &lt;columnFooter&gt;
        &lt;band height="42" splitType="Stretch"&gt;
          &lt;textField isStretchWithOverflow="true"&gt;
              &lt;reportElement x="0" y="0" width="50" height="21"/&gt;
              &lt;textElement textAlignment="Center" verticalAlignment="Middle"/&gt;
              &lt;textFieldExpression&gt;&lt;![CDATA["Example text...."]]&gt;&lt;/textFieldExpression&gt;
          &lt;/textField&gt;            &lt;textField isStretchWithOverflow="true"&gt;
              &lt;reportElement x="0" y="0" width="50" height="21"/&gt;
              &lt;textElement textAlignment="Center" verticalAlignment="Middle"/&gt;
              &lt;textFieldExpression&gt;&lt;![CDATA["More example text...."]]&gt;&lt;/textFieldExpression&gt;
          &lt;/textField&gt;
        &lt;/band&gt;
  </code></pre>
  
  <p></p>
  
  <p>(Or add any number of textFields.  Since I do not know how many will be added, I need to dynamically resize the band somehow) I'm looking for a way to dynamically do this in Java and not have to hardcode it in the jrxml file.  Thanks</p>