husainahmad Posted July 23, 2007 Share Posted July 23, 2007 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 More sharing options...
singhipst Posted July 23, 2007 Share Posted July 23, 2007 it will be better if you send your jrxml so that we can understand better Link to comment Share on other sites More sharing options...
yaramada123 Posted July 23, 2007 Share Posted July 23, 2007 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now