I have faced some configuration problem when I started work on iReport. I want to share some suggestion for you guys. Hope it will help you to understand iReport configuration in better way.
Set java path for IReport
When we install ireport in Ubuntu then we need JRE to run it properly. It take path of java from installed jdk. Sometimes we need to set java path specially for iReport. e.g. if I want to install lower version of iReport than 5.5.0 then it requires jdk1.7 or less. If in your system jdk1.8 is installed then you need to degrade it into jdk7 or lower version.
To deal this situation you can set jdk path iReport config “iReport/etc/ireport.conf”.
Syntax is here:
// default location of JDK/JRE, can be overridden by using --jdkhome <dir> switch jdkhome="/opt/jdk1.6.0_45"
/opt/jdk1.6.0_45 is a path of jdk. You can put it anywhere in your system.
Choose Compatible Version in IReport
If you are using iReport for creating jrxml file then always download latest version of iReport. If you want compile or execute older version of jrxml file then you just need to make your iReport compatible with that particular version.
For this you need to follow these instruction.
Goto: Tools -> Options -> iReport -> General -> Compatibillity
From here you can choose version from drop down. Versions are available from 3.1.0 to latest version. You can choose any version according to your requirement.
Add external jar file in iReport:
Sometimes you need to add external jar file in your jasper report e.g to add sciptlet jar file. If you are using iReport for creating jrxml file then you need to add jar file in classpath. You can follow this procedure.
Goto: Tools -> Options -> iReport -> Classpath
From here you can add external jar file in your class path.
Install new Font:
Sometimes you need to add additional font in your report. If you are using iReport then you need to install font first from here.
Goto: Tools -> Options -> iReport -> Fonts
From here you can install new fonts. It only accept True Type Font. So for installation you should download .ttf file and install it. Remember this fonts only works in iReport. If you want to add it in your application then you should export it using “Export as extension” button. Save it with .jar extension and save it in your application’s classpath. It will work like a charm.