Académique Documents
Professionnel Documents
Culture Documents
Jaspersoft
iReport Designer
Table of Contents
TABLE OF CONTENTS
Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.1
Features of iReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2
1.3
1.4
Platform Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2
Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3
Development Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4
Compiling iReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.5
Installing iReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.6
2.7
2.8
2.9
2.10.2
3.2
3.3
3.4
3.5
3.6
Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.5.1
3.5.2
3.5.3
3.8
3.9
4.2
4.3
Bands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.1.1
Report Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.1.2
Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.1.3
Band Height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.2.2
4.2.3
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.2
5.3
5.4
Formatting Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
5.1.2
5.1.3
5.1.4
5.1.5
Graphic Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
5.2.2
5.2.3
Static Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.3.2
Textfields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Other Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5.4.1
Subreports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5.4.2
Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
5.4.3
Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
5.4.4
Crosstab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
5.4.5
Page/Column Break . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
5.5
5.6
Anchors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
5.6.1
Hyperlink Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
5.6.2
Hyperlink Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
5.6.3
Hyperlink Tooltip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Table of Contents
6.2
6.1.2
6.1.3
6.1.4
6.2.2
6.2.3
6.2.4
6.3
6.4
7.2
7.3
8.2
8.3
8.4
8.5
8.6
8.7
8.8
9.2
Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
9.3
9.4
9.5
9.6
9.7
10.1.2
10.1.3
10.1.4
ClassNotFoundError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
11.3.2
11.3.3
11.3.4
11.4.2
11.6.2
11.6.3
11.6.4
11.6.5
11.6.6
11.6.7
11.6.8
11.6.9
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
11.8.2
12.5.2
12.5.3
Table of Contents
13.2.2
13.2.3
13.2.4
13.2.5
13.3.2
13.3.3
13.4.2
13.4.3
14.1.2
14.1.3
14.1.4
14.1.5
14.1.6
Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
14.2.2
14.2.3
14.2.4
14.2.5
14.2.6
Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
14.3.2
14.3.3
14.3.4
Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
16.2.2
19.2.2
Introduction
CHAPTER 1
INTRODUCTION
iReport is an open source authoring tool that can create complex reports from any kind of Java application through the
JasperReports library. It is written in 100% pure Java and is distributed with source code according to the GNU General Public
License.
Through an intuitive and rich graphic interface, iReport lets you rapidly create any kind of report very easily. iReport enables
engineers who are just learning this technology to access all the functions of JasperReports, as well as helping skilled users to
save a lot of time during the development of very elaborate reports.
With Version 3.1, iReport was almost completely rewritten, with the new application based on the NetBeans rich client
platform. Even though the user interface appears pretty much the same, a complete new design of the iReport core and the use
of the NetBeans platform will allow us to quickly create new features, making iReport even easier to learn and use.
With this iReport Ultimate Guide youll learn how to add visual and analytic features to complex reports with charts, images,
and subreports. This informative guide has transformed many a newcomer into designers of pixel-perfect, complex, and highly
interactive reports. It is written and updated by Giulio Toffoli, iReport project founder and architect.
This chapter has the following sections:
Features of iReport
The iReport Community
JasperReports Commercial License
Code Used in This Book
1.1
Features of iReport
The following list describes some of the most important features of iReport 3.5:
Version 3.6 added support for visual components based on Adobe Flash.
Version 3.7 has these new features:
1.2
The iReport team comprises many skilled and experienced programmers who come from every part of the world. They work
daily to add new functionality and fix bugs. The iReport web site is at http://ireport.sourceforge.net. If you need help with
iReport, there is a discussion forum in English. This is the place where you can send requests for help and technical questions
about the use of the program, as well as post comments, discuss implementation choices, and propose new functionality. There
is no guarantee of a prompt reply, but requests are usually satisfied within a few days time. This service is free. If you need
information concerning commercial support, you can write to sales@jaspersoft.com.
Please report bugs at the following address:
http://jasperforge.org/tracker/?group_id=83
At the project site, there is a system to send requests for enhancement (RFE). There is also the ability to suggest patches and
integrative code. All members of the iReport team value feedback from the user community and seriously consider all
suggestions, criticism and advice coming from iReport users.
1.3
The Pro components of JasperReports Professional require a commercial license. iReport Professional includes a full-feature,
30-day evaluation license that must be replaced with the commercial license provided by Jaspersoft. The commercial license
can be installed using the License Manager.
10
Introduction
To open the License Manager select Help License Manager:
Figure 1-1
Click Install License and select the license file to use. iReport will copy the provided file in the user directory with the name
jasperreports.license. If the license is not valid, a message will explain the problem and what do to.
If you do not purchase the commercial license and the evaluation license expires, iReport shows the following message at
startup. You can still use iReport with the expired license, but you cannot run reports that use Pro components:
Figure 1-2
1.4
Java
JavaScript
Groovy
All the sample expressions used in this guide are written in JavaScript.
11
12