Jump to content
Changes to the Jaspersoft community edition download ×

Count/Sum Group in Summary


husainahmad

Recommended Posts

Hi

 

i'm trying to create a report using jasperreports, my report has a group wich is i need to count/sum it on summary, here is an example :

 

Code:
No. Dept      Name   Hour   Salary/Hour  Income
------------------------------------------------
1. Sales Adul 2 1000 2000
2. Sales Beni 3 1000 3000
------------------------------------------------
Total Per Group 5 5000
------------------------------------------------
1. IT Dodi 2 2000 4000
2. IT Adi 3 2000 6000
------------------------------------------------
Total Per Group 5 10000
------------------------------------------------
Total 15000

 

i need to sum Total in summary, wich is "5000+10000", but i'm still getting the wrong value in my report.

 

does anyone have solution?

thanks

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi,

If $F{AMOUNT} is the field holding amounts 3000, 2000 etc., on your report, declare a variable $V{REPORT_SUM} with Reset Type: Report, Calculation Type: Sum/Count and Variable Expression: $F{AMOUNT}....this will give you 5000+10000 as you wanted it.....

 

I am sure this works, let me know the results....

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...