title: vertical text alignment in jasper reports
body: <p><strong>I have a table in a jasper report, and I need the contents of certain cells in that table to be vertically aligned.</strong>  I'm attempting to edit the report with iReport.</p>
  
  <p>In iReport I can go into the properties of a cell and see that the vertical align is set to "Middle".  Additionally, when I look at the XML directly (see below), <strong>I can see that the <em>textElement</em> tag has a verticalAlignment="Middle" attribute.</strong></p>
  
  <p><strong>So near as I can tell the text should be vertically aligned within its little box, and yet it will not align properly.</strong></p>
  
  <p>I'm hoping that someone experienced with vertically aligning things in jasper reports can <strong>point out what I'm doing wrong.</strong>  Thanks much.</p>
  
  <pre><code>&lt;textField 
    isStretchWithOverflow="false"
    isBlankWhenNull="true" 
    evaluationTime="Now" 
    hyperlinkType="None"
    hyperlinkTarget="Self" &gt;
  
    &lt;reportElement
      x="227"
      y="0"
      width="31"
      height="14"
      key="textField-4"/&gt;
  
    &lt;box&gt;
      &lt;topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/&gt;
      &lt;leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/&gt;
      &lt;bottomPen lineWidth="0.0" lineColor="#000000"/&gt;
      &lt;rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/&gt;
    &lt;/box&gt;
  
    &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
      &lt;font fontName="Times New Roman" pdfFontName="Times-Roman" size="8"/&gt;
    &lt;/textElement&gt;
  
    &lt;textFieldExpression class="java.lang.String"&gt;&lt;![CDATA[$F{someVariableName}]]&gt;&lt;/textFieldExpression&gt;
  &lt;/textField&gt;
  </code></pre>
  
  <p>So, to be clear, what I have in my report is something like this:</p>
  
  <pre><code>|--------|
  |  text  |
  |        |
  |        |
  |--------|
  </code></pre>
  
  <p>And what I <em>want</em> is something like this:</p>
  
  <pre><code>|--------|
  |        |
  |  text  |
  |        |
  |--------|
  </code></pre>