Java Reference
In-Depth Information
Controlling Report-Wide Layout
Properties
The <jasperReport> root element of the JRXML template contains a number of
attributes that allow us to control report layout. The following table summarizes
these attributes:
Attribute
Description
Valid Values
Default Value
pageWidth
Determines the width
of the page, in pixels.
Any non-negative integer 595
pageHeight
Determines the
height of the page,
in pixels.
Any non negative integer 842
leftMargin
Determines the left
margin of the page,
in pixels.
Any non-negative integer 20
rightMargin
Any non-negative integer 20
Determines the right
margin of the page,
in pixels.
topMargin
Determines the top
margin of the page,
in pixels.
Any non-negative integer 30
bottomMargin
Determines the top
margin of the page,
in pixels.
Any non-negative integer 30
orientation
Determines the
orientation of
the page.
Portrait , Landscape
Portrait
whenNoDataType
Determines how to
create report with no
data in its datasource.
NoPages , BlankPage ,
AllSectionsNoDetail
NoPages
isTitleNewPage
Determines if the title
section of the report
will be printed on a
separate page.
true , false
false
isSummaryNewPage Determines if the
summary section
of the report will
be printed on a
separate page.
true , false
false
Most of the attributes in the table are self explanatory, and their use should be
intuitive. However, the whenNoDataType attribute deserves more explanation.
 
Search WWH ::




Custom Search