title: add vertical line in jasperreports
body: <p>I am using <em>JasperReports</em> as a reporting tool for Web Application. (JSP + Servlets)</p>
  
  <p>I have developed a Report named <code>Cust</code> which has Sub Report named <code>CustSub</code>. In sub report I want vertical line for some columns, so I have added a <code>line</code> of exact height of that <code>frame</code>. Height of <code>Bond</code>, <code>Frame</code> and vertical <code>line</code> is same.</p>
  
  <p><img src="https://i.stack.imgur.com/beZEg.png" alt="enter image description here"></p>
  
  <p>So let me know if there is any better way of doing this?</p>
  
  <p><strong>Update1</strong></p>
  
  <p>This are the <code>styles</code> I have applied for alternate row color</p>
  
  <pre><code>&lt;style name="Detail" mode="Transparent" fontName="Times New Roman" pdfFontName="Times-Roman"/&gt;
  &lt;style name="Row" mode="Transparent" fontName="Times New Roman" pdfFontName="Times-Roman"&gt;
      &lt;conditionalStyle&gt;
          &lt;conditionExpression&gt;&lt;![CDATA[$V{REPORT_COUNT}%2 == 0]]&gt;&lt;/conditionExpression&gt;
          &lt;style mode="Opaque" backcolor="#F0EFEF"/&gt;
      &lt;/conditionalStyle&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>and this is <code>Detail Band</code> (I have included only two textfields from code, so please don't consider <code>x="258"</code> of line,)</p>
  
  <pre><code>&lt;detail&gt;
  &lt;band height="18" splitType="Stretch"&gt;
      &lt;frame&gt;
          &lt;reportElement uuid="aa7987da-d84a-4d11-b079-44005699151d" style="Row" stretchType="RelativeToBandHeight" mode="Opaque" x="1" y="0" width="555" height="18"/&gt;
  
          &lt;textField isStretchWithOverflow="true" pattern="dd/MM/yy" isBlankWhenNull="true"&gt;
              &lt;reportElement uuid="8a0ce8e2-1beb-4300-81ea-f3422abef623" style="Detail" positionType="Float" x="2" y="0" width="60" height="18"/&gt;
              &lt;textElement&gt;
                  &lt;font fontName="Times New Roman" size="14"/&gt;
              &lt;/textElement&gt;
              &lt;textFieldExpression&gt;&lt;![CDATA[$F{TRNDATE}]]&gt;&lt;/textFieldExpression&gt;
          &lt;/textField&gt;
  
          &lt;textField isStretchWithOverflow="true" isBlankWhenNull="true"&gt;
              &lt;reportElement uuid="74be5885-f344-4451-a3a5-62213d3a3dd1" style="Detail" positionType="Float" x="120" y="0" width="68" height="18"/&gt;
              &lt;textElement&gt;
                  &lt;font fontName="Times New Roman" size="14"/&gt;
              &lt;/textElement&gt;
              &lt;textFieldExpression&gt;&lt;![CDATA[$F{AMOUNT}]]&gt;&lt;/textFieldExpression&gt;
          &lt;/textField&gt;
  
      &lt;line&gt;
          &lt;reportElement uuid="06d698e3-34c2-445a-8787-a54bd38a2121" style="Detail" stretchType="RelativeToBandHeight" mode="Transparent" x="258" y="0" width="1" height="18" backcolor="#FFFFFF"/&gt;
      &lt;/line&gt;
  
      &lt;/frame&gt;
  &lt;/band&gt;
  &lt;/detail&gt;
  </code></pre>