In this section we will discuss how to install and configure JFreeReport and you will see that installing it is mainly a matter of setuping the classpath of your application and a little bit of handy configuration.
Classpath setup
The modules
JFreeReport has been designed by keeping in mind that most of the users will not need the whole features it can provide. So all components are modularized and then configurable, changeable or removable.
//You will see in the following lists the modules...
Each module is defined and configured by two files, module.properties
and configuration.properties
. Whenever you decided to tune or change the default beahavior of a module, first look at these files to get informed about what is configurable. If you want to remove a module, you have two choices :
First, do not include the module in your classpath, when you are dealing with jfreereport-module-<modulename>-<version>.jar
module libraries it is easy. If you do not remember what are these *.jar
libraries, go back to Bundled distribution section for more explanations.
Second, desactivate them by empting their Module configuration key. Here is an example :
# Excel GUI export module activated org.jfree.report.modules.gui.xls.Module=org.jfree.report.modules.gui.xls.ExcelExportGUIModule # Excel GUI export module desactivated org.jfree.report.modules.gui.xls.Module=
Jump to section Configurations if you want to know where is the right place to put this kind of statments.
Optimizations
In this section we will discuss about some optimisation you could do to speed up your application when using JFreeReport. Don't expect to find the path to enlightenment, it is just little tips:
- Use the less possible dynamic fields. The underlying algorithm is realy complicated and is a true performance killer to compute size of elements.
- Use less BeanShell scripts. Theses kind scripts are compiled at runtime so it will slow down the report processing.
The use of scripts is realy minored on 0.8.8 and above versions because we have now introduced an excel-style formula system which allows simple inline formulas on fields. - Use SrollableResultset if you have to trade with a high volume of data. In that case data will be fetched when needed instead of reading it fully and keeping it in memory.
// threads, webapps, classloader (for the boot)