I want to add all the columns in row wise. and also i want to add the cross tab sum. and also please tell me how to add the rows with date(i want to add all the columns if the date is same)
Please refer the table below.
Sub | 2001 | 2002 | 2003 | 2004 | 2005 | 2006 | Total | Grand Toal |
abcd | 100 | 200 | 200 | 200 | 100 | 100 | 900 | 900 |
efgh | 200 | 200 | 100 | 150 | 150 | 300 | 1100 | 900+1100 |
ijkl | 150 | 200 | 300 | 500 | 200 | 150 | 1500 | 900+1100+1500 |
2 Answers:
Hi rams
The way you sum it also depends on the way you're filling it.
If it's the same field (from 2001 to 2006) you can make a variable $V{Total} with:
Expression: $F{Number}
Calculation: sum
Reset type: the *GroupName* where you're putting every row.
I'm also kinda new in jasperStudio, can you give more info about how are you working with the values?
Hi there,
i did it like :
-create variable grand_total
-default expression is 0
-expression is : $V{GRAND_TOTAL}+$F{FIELD_NAME}
-put the variable in the table
note if u want to reset the grand total, the step @gabriel told us is the way!
damn why ur name is gabriel :')
also make sure both variable and field is BigDecimal type
im also new to jasper, hello fellow newbies :D
regards - TV