There are two kinds of iReport files, one is .jrxml source file (similar to .java), and the other is .jasper compiled file (similar to .class). What we drag and drop in ireport is the .jrxml file. And click the preview to generate the .jasper file.
It is said to be .jrxml, but it is actually an XML file, but this file needs to conform to the xsd format of ireport, and it can also expand its own tags, but the tags defined by itself do not support drag and drop, unless you implement it yourself.
Through our designed .jrxml, we can convert a series of data from any data source (such as jdbc, cvs, xml, javabeans, excel, etc.) to the format we want and export to HTML/EXCEL/WORD/PDF/ FLASH and other report files.
1. iReport report file - basic properties
Classification | property name | Function description |
report name | report name | |
Page Size | ||
Page Width | page width | |
Page height | page height | |
Orientation | Report orientation, which can be horizontal or vertical, the default is vertical for the public | |
Margins | ||
Left margin | The left end of the page is blank, the unit is px, the default is 20px | |
Right margin | The right end of the page is blank, the unit is px, the default is 20px | |
Top margin | The top of the page is blank, the unit is px, the default is 20px | |
Bottom margin | Blank at the bottom of the page, unit px, default 20px | |
Columns | ||
Columns | The report is divided into several columns, the default is one column. | |
Column Width | the width of each column | |
Column space | white space between columns | |
Print order | Printing method - vertical/horizontal. Default vertical | |
More | ||
Scriptlet class | A custom scriptlet to customize some behavior when the report is generated. | |
Resource bundle | Resource files used in reports, support internationalization | |
When Resource Missing Type | When the resource property is not found, what is the value? Can be null, blank, error, element's key | |
Query Text | The SQL query statement can also be set in the DataSet. | |
The language for the dataset query | The type of SQL statement can also be set in the DataSet. Such as ordinary SQL, Hibernate, MDX, etc. | |
Filter Expression | Filter the result of the SQL statement query again, write it with ireport expression, the return type must be Boolean type | |
Properties | Some additional property settings supported by the report | |
Title on a new page | Whether the Title occupies a single page | |
Summary on a new page | Whether Summary occupies a single page | |
Summary with Page Header and Footer | Whether to display Page Header and Page Footer in Summary | |
Float column footer | ||
Ignore pagination | Whether to not paginate, the entire report is displayed on one page | |
Column Direction | Whether the report is displayed left or right | |
When No Data |
When the Main DataSet records 0, what is displayed? The options are:
1. Everything except Details Band
2. Blank page
3. Display NoData Band (this band can be defined separately for the report, and it is used for information prompt when there is no data)
4. Show nothing
|
|
Language | The type of expression of the report: the options are -java, groovy, javascript | |
Format Factory Class | The formatting scheme of Data and Number types can be customized. This class needs to inherit from the XX class | |
Imports | Can reference other packages, custom or 3rd party etc. For example org.myself.utils |
Band height | band的高度 |
Print When Expression | 当表达式为TRUE时,才显示该Band |
Split Type | 可设置当内容超过当前Band高度时,是继续显示一部分,还是在新的一页显示完整内容。 1.Immediate 直接显示不完整信息 2.Prevent 到新的一页显示完整信息 3.Stretch 延伸当前页,显示完整信息 |
Band Name | 功能描述 |
Title | 报表的标题,仅显示一次,可设置为单独占一页。 需注意在这里使用variable时,不能设置其Evaluation Time 为 Now,否则为null |
Page Header | 每页的头部,在每页都会显示一次 |
Column Header | 每列的头部,一般的情况下,我们将表头设置在这里。 |
XXX Group Header | 当报表中存在Group时,才有此band。显示在每个Group的开始位置。有多少个Group显示多少次。一般将Group Name 显示在这里 |
Detail | 数据明细,每行数据在这里显示。有多少行数据,显示多少次。 |
XXX Group Footer | 当报表中存在Group时,才有此band。显示在每个Group的结束位置。有多少个Group显示多少次。一般将Group 汇总计算信息 显示在这里 |
Column Footer | 每列的底部,一般的情况下,将整个数据明细汇总信息显示在这里。 |
Page Footer | 每页的底部,在每页都会显示一次 |
Last Page Footer | 最后一页的底部,在最后一页才显示一次。 |
Summary | 汇总页,仅在报表最后显示一次,一般将整个报表的汇总信息显示在这里。 |
No Data | 当报表查询记录为0时,可设置显示该Band内容。比如可设置其内容为:“当前查询无数据,如有问题请联系XXXX.” |
Background | 整个报表的背景,比如我们给整个报表设置一个水印效果 |