Reputation: 6181
I am using JasperReports as a reporting tool for Web Application. (JSP + Servlets)
I have developed a Report named Cust
which has Sub Report named CustSub
. In sub report I want vertical line for some columns, so I have added a line
of exact height of that frame
. Height of Bond
, Frame
and vertical line
is same.
So let me know if there is any better way of doing this?
Update1
This are the styles
I have applied for alternate row color
<style name="Detail" mode="Transparent" fontName="Times New Roman" pdfFontName="Times-Roman"/>
<style name="Row" mode="Transparent" fontName="Times New Roman" pdfFontName="Times-Roman">
<conditionalStyle>
<conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 0]]></conditionExpression>
<style mode="Opaque" backcolor="#F0EFEF"/>
</conditionalStyle>
</style>
and this is Detail Band
(I have included only two textfields from code, so please don't consider x="258"
of line,)
<detail>
<band height="18" splitType="Stretch">
<frame>
<reportElement uuid="aa7987da-d84a-4d11-b079-44005699151d" style="Row" stretchType="RelativeToBandHeight" mode="Opaque" x="1" y="0" width="555" height="18"/>
<textField isStretchWithOverflow="true" pattern="dd/MM/yy" isBlankWhenNull="true">
<reportElement uuid="8a0ce8e2-1beb-4300-81ea-f3422abef623" style="Detail" positionType="Float" x="2" y="0" width="60" height="18"/>
<textElement>
<font fontName="Times New Roman" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$F{TRNDATE}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="74be5885-f344-4451-a3a5-62213d3a3dd1" style="Detail" positionType="Float" x="120" y="0" width="68" height="18"/>
<textElement>
<font fontName="Times New Roman" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$F{AMOUNT}]]></textFieldExpression>
</textField>
<line>
<reportElement uuid="06d698e3-34c2-445a-8787-a54bd38a2121" style="Detail" stretchType="RelativeToBandHeight" mode="Transparent" x="258" y="0" width="1" height="18" backcolor="#FFFFFF"/>
</line>
</frame>
</band>
</detail>
Upvotes: 0
Views: 1773
Reputation: 3548
Just drag line element from palette and drag the bottom middle point of that tile element to increase the size and then decrease the width by dragging left middle point.
Upvotes: 1