sach411 Posted May 30, 2015 Share Posted May 30, 2015 I have a simple crosstab report as below.And I need the count of non-zero measure. i.e. if any Account has non-zero value, it is counted as 1. and counts across row are printed in the last column. Account1Account2Account3NonZero Value Count2012320452201312161132014001111120150000 I'm trying to add variables, measures however unable to figure out.Please share any thought on how this can be achived in jasper report without using any java code.. i.e. purely in JRXML. Link to comment Share on other sites More sharing options...
jo.jasmine Posted June 6, 2015 Share Posted June 6, 2015 Try this.create 4 varaibles v1,v2,v3,v4 of integer data typev1 -> $F{Account1} == 0 ? 0:1v2 -> $F{Account2} == 0 ? 0:1v3 -> $F{Account3} == 0 ? 0:1v4-> $V{v1}+$V{v2}+$V{v3}create a new column label as NonZero Value Count( - column header )and have the value as $V{v4} ( - detail band)Let me know if you face any issue 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