neozerabbit Posted January 12, 2011 Share Posted January 12, 2011 For a sub report I have for exempleGlobalView Total typeA type BCommission sum(commissions) sum(commissions of type==typeA) sum(commissions of type==typeB)Fees ........... I only use the page footer to display my data after everythinh has been processed.Total is quite easy I only have to set a sum of my "commission" filed on the page. But for "typeA" & "typeB" I do not know how I can filter data (i made some try with if condition). AnthonyPost Edited by neozerabbit at 01/13/2011 09:09 Link to comment Share on other sites More sharing options...
ceday Posted January 13, 2011 Share Posted January 13, 2011 sum expression for COMMISSIONA=> $F{TYPE}.equals("A") ? $F{COMMISSION} : new BigDecimal(0) Link to comment Share on other sites More sharing options...
neozerabbit Posted January 13, 2011 Author Share Posted January 13, 2011 Thank you. I realize my mistake was on the if expression.I set .... == "typeA" instead of .....equals(...) in my sum variable 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