Jump to content
We've recently updated our Privacy Statement, available here ×

how to Sum total row in jasper report


rams1231

Recommended Posts

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.

Sub200120022003200420052006TotalGrand Toal
abcd100200200200100100900900
efgh2002001001501503001100900+1100
ijkl1502003005002001501500900+1100+1500

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...