I'm looking at displaying the sum of a column in iReport. I'm using netbeans, java and sqlite as database. Basically, I want to group the report by department and show each department's total overtime listing each staff's overtime in 1 line too.
E.g. from database:
Name Date Department Overtime Hours
Employee1 09/22 Management 3.0
Employee1 09/23 Management 2.0
Employee2 09/22 Management 1.0
Employee3 09/23 HR 2.0
Employee3 09/23 HR 2.5
What I want to display in the report is like this:
Department: Management
Name Total Overtime
Employee1 5.0
Employee2 1.0
Total Overtime : 6.0
Department: HR
Employee3 4.5
Total Overtime: 4.5
I've checked the link below and it helped a bit but I couldn't do it in a way as I described above. If anyone can help pointing me to a direction how this can be done, I'd really appreciate it. Thanks!
How to sum all values in a column in Jaspersoft iReport Designer?