RAJIV Posted December 22, 2007 Share Posted December 22, 2007 Hi EveryBody, I am generating report(PDF format),..in that i am facing a problem. I want to display sum of one column values based on other column values repectively. Example,My report has 2 column like the follwingCode SumInsuredKRW 1000.00USD 200.00KRW 2000.00 At the end of my last page i want display like this Total Sum Insured in KRW is : 3000.00Total Sum Insured in USD is : 200.00Total Sum Insured in INR is : 0.00 How to do,...pls help me for this I have been using iReports tool design my PDF page Regards,Rajiv Link to comment Share on other sites More sharing options...
yaramada123 Posted December 22, 2007 Share Posted December 22, 2007 You can use variables to do this...You must be having 2 fields representing code and amount, I am assuming them as $F{CODE} and $F{AMOUNT} You can define a variables $V{TOTALAMOUNT_KRW},$V{TOTALAMOUNT_USD} etc., with evaluation time as Report and calculation as "Sum" Assign the expression: $F{CODE}.equals("KRW")?$F{AMOUNT}:0 You can replace KRW with different currencies for each variable and use the variables in your report to show the Amounts for each currencies...... All the Best!!! Jagadeesh 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