9
如何用类似数据的表格创建报表?在jasperreports中添加表格边框
我能够创建一个报告,详情如下。它将数据排列成一个类似于表格的结构。
<jasperReport>
.
.
<pageHeader>
<band height="30">
<staticText>
<reportElement x="0" y="0" width="69" height="24" />
<textElement verticalAlignment="Bottom" />
<text><![CDATA[ID: ]]></text>
</staticText>
<staticText>
<reportElement x="140" y="0" width="69" height="24" />
<textElement verticalAlignment="Bottom" />
<text><![CDATA[NAME: ]]></text>
</staticText>
<staticText>
<reportElement x="280" y="0" width="69" height="24" />
<textElement verticalAlignment="Bottom" />
<text><![CDATA[AGE: ]]></text>
</staticText>
</band>
</pageHeader>
<detail>
<band height="30">
<textField>
<reportElement x="0" y="0" width="69" height="24" />
<textFieldExpression class="java.lang.String"><![CDATA[$F{id}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="140" y="0" width="69" height="24" />
<textFieldExpression class="java.lang.String"><![CDATA[$F{name}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="280" y="0" width="69" height="24" />
<textFieldExpression class="java.lang.String"><![CDATA[$F{age}]]></textFieldExpression>
</textField>
</band>
</detail>
</jasperReport>
但是行和列没有边界?我如何在Jasperreport 4.5中实现这一目标?
感谢
您好.. @ Alex..can我们从GUI只添加右边框特定文本框/标签(iReport的)?我不能这样做..任何想法?谢谢 – 2013-09-30 10:18:35
@VishalZanzrukia当然可以。你做错了什么 – 2013-09-30 10:19:51
嗨@ @亚历克斯感谢但是,我无法在GUI中得到任何选项..我可以通过你提到的选项“填充和边框”添加边界到所有边或没有任何边。你能帮我怎么样吗? – 2013-09-30 11:50:35