Adding table border in jasperreports

后端 未结 1 1358
旧巷少年郎
旧巷少年郎 2020-11-29 10:20

How do you create a report with table like data?

I was able to create a report with details below. It arranges the data in a table-like structure.

&         


        
相关标签:
1条回答
  • 2020-11-29 10:50
    • You can add borders with help of GUI designer (iReport, for example) or you can add the box element manually (edit the jrxml file) like in this sample:
    <textField>
        <reportElement x="29" y="17" width="100" height="20"/>
        <box>
            <topPen lineWidth="1.0"/>
            <leftPen lineWidth="1.0"/>
            <bottomPen lineWidth="1.0"/>
            <rightPen lineWidth="1.0"/>
        </box>
        <textElement/>
        <textFieldExpression><![CDATA[$F{field}]]></textFieldExpression>
    </textField>
    
    • In iReport you can use "Padding And Borders" context menu. iReport context menu

    • In Jaspersoft Studio you can set borders with help of Properties dialog (tab Borders).

    0 讨论(0)
提交回复
热议问题