A formula is a symbolic statement of the manipulations you want to perform on certain data. JReport provides a number of built-in functions for you to build your formula. Also it provides user defined formula (UDF) functions that allow you to design your own formula functions.
Generally, formulas can be used:
Note: When running in the Java VM environment using JDK, JReport Server can use javac.exe in the JDK to compile formulas. However if JReport runs with JRE, you need to specify a Java compiler for compiling formulas, otherwise formulas in reports may not work or even result in the failure of running the reports. In the JRE environment, if you are going to use Eclipse to compile formulas, add the option -Djavacompiler=ECJcompiler in the startup file of JReport Server. If you are to use tools.jar to compile, copy tools.jar from JDK(where the JRE is located)\lib
to the JRE\lib
folder and add the option -Djavacompiler=SysCompiler in the JReport Server startup file.
This chapter contains the following topics: