Adding page border in jasper report

2019-02-18 20:38发布

问题:

I have gone through some posts regarding "adding page border in jasper reports" but dint help much. Someone please tell me in detail how to add page border?

回答1:

I achieved this by adding a background to my reports like this for example:

<background>
    <band height="802" splitType="Stretch">
        <rectangle>
            <reportElement key="rectangle-2" x="0" y="76" width="535" height="726"/>
            <graphicElement>
                <pen lineWidth="0.5" lineStyle="Solid"/>
            </graphicElement>
        </rectangle>
    </band>
</background>