Tuesday, July 24, 2012

Print When Expression in Jasper Report

In some cases, we need to filter data values while printing in the report.

There is a special feature in iReport for this called as "Print When Expression".
In this expression, you have to insert Boolean function to the iReport.

For example :-

new Boolean($P!(var_name).toString.equals("5"))

Suppose the parameter variable is "var_name". If the value of the "$P!(var_name)" is equal to "5", it will print the value. Else, it will print null/blank value.