Tuesday, 2 December 2014

Tip : Border to a report in Jasper iReport or Japser Studio - 5.6

Today, I came across a simple requirement to draw border to a report in Jasper iReport/Studio - (5.6) and this small tip may help you to save your time. :-)

1) Add Background band to the report ( By default the size of the band is zero(0)) set the height adjustable ( for example : 812 px).

2) Drag and drop fields to Detail band and give borders to the field cells (0.25 px)

3) Take "Frame" element in Background band and give borders to it (again 0.25px) and give same height as band as in step 1.

4) Save the report & preview the output. ( Tested in Internal Preview, not pdf or word , if you see the output in any of them you may not find the borders as you might need to set over lap properties - find it and set the property for it. ).

Sample JRXML file : Click me to Download.

Sample Design Image :

Sample Output Image : 

References : 
1) http://stackoverflow.com/questions/7193235/how-to-draw-a-border-around-both-the-column-header-footer-and-detail-sections

2) http://stackoverflow.com/questions/9311959/detail-band-with-borders-in-ireport

No comments:

Post a Comment