4

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?

Punky
  • 97
  • 1
  • 12
  • What bands do you want to place inside the border? – Alex K May 12 '12 at 06:21
  • @Alex K i would like to put detail, groupHeader,pageHeader,title etc. .. – Punky May 13 '12 at 10:34
  • possible duplicate of [Set border of a jasper subreport having a title and a detail band](http://stackoverflow.com/questions/18184873/set-border-of-a-jasper-subreport-having-a-title-and-a-detail-band) – Emmanuel Angelo.R May 15 '14 at 12:31

2 Answers2

9

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>
lkdg
  • 1,031
  • 7
  • 18
0

Thanks, It worked for me I altered it accordingly to my requirement, Border for A4 report

<background>
    <band height="802" splitType="Stretch">
        <rectangle>
            <reportElement key="rectangle-2" x="0" y="2" width="554" 
    height="800" uuid="ac366ac4-d847-416c-94a7-38a4b2a049da"/>
            <graphicElement>
                <pen lineWidth="0.5" lineStyle="Solid"/>
            </graphicElement>
        </rectangle>
    </band></background>