Reputation: 1071
I have the following JasperReport scriptlet, it works fine:
public class ReportScriptlet extends JRDefaultScriptlet {
public void beforeGroupInit(String groupName) throws JRScriptletException {
System.out.println("in beforeGroupInit - " + groupName);
}
public void afterGroupInit(String groupName) throws JRScriptletException {
System.out.println("in afterGroupInit - " + groupName);
}
}
The issue is that beforeGroupInit
and afterGroupInit
run BEFORE the lines of the group are printed, and I need to make a calculation AFTER the lines are printed.
Since there is no afterGroupFinalized
event, is there a different way to achieve this?
Upvotes: 0
Views: 233
Reputation: 26
Why don't you use the GroupFooter? You can create a new variable, set your calculation and set the right field in the variable expression
Upvotes: 1