References
Internationalization
There are two ways to associate the java.util.ResourceBundle
object with the report template.
- At design time, by setting the
resourceBundle
attribute of the report template object to the base name of the target resource bundle. - A dynamic/runtime association can be made by supplying a
java.util.ResourceBundle
object as the value for theREPORT_RESOURCE_BUNDLE
parameter at report-filling time.
Example (at design time):
Resources.properties
or Resources_en_GB.properties
|
|
|
|
|
|
In order to internationalization of parameter $P
or dataset field $F
, you can use the method str()
.
|
|
If the report needs to be generated in a locale that is different from the current one, the built-in REPORT_LOCALE
parameter can be used to specify the runtime locale when filling the report.
|
|
Pagination
The common approach, as you mentioned, uses two separated text fields:
Current page number: $V{PAGE_NUMBER}
with EvaluationTime: Now
Total page number: $V{PAGE_NUMBER}
with EvaluationTime: Report
|
|
For JasperReports 6+, use MASTER_CURRENT_PAGE
and MASTER_TOTAL_PAGES
system variables and remember to set the text field evaluationTime
to Master
:
|
|
New page, splitType
Create a new band
with splitType="Immediate"
property to add a new page.
|
|
Floating, positionType
If you need to have a staticText to float below another element with variable height, you can use positionType="Float"
.
Floating object will move down if necessary, but if the previous object is smaller than expected, it doesn’t move up.
According to the documentation, the floating element would have its y
attribute ignored.
|
|