Java Reference
In-Depth Information
In this report template, setting the calculation attribute of the <variable> field to
Count allowed us to obtain the number of aircrafts in each state. By setting the report
expression to $F{aircraft_serial} , each time a serial number is displayed in the
report, the variable value is increased by one. Setting the resetType attribute to
Group allows us to reset the variable value to its initial value, which in turn is set by
the <initialValueExpression> field.
We are familiar with the code for the servlet that fills and exports the Jasper file
generated by this JRXML template. Therefore, it is not shown. After directing the
browser to its URL, we should see a report like the following:
The concepts we saw here can be applied for the other calculation values and
reset types.
Search WWH ::

Custom Search