Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1118
  • Last Modified:

column wise total

I display  data  in a table in  my jsp page.

Now I  want column wise sum total   and want to display  it  at the bottom of  every column.  

I'm stuck in the logic to do column wise sum total .  Do I need two  for loop ?     What is the easiest solution ?
0
cofactor
Asked:
cofactor
  • 2
1 Solution
 
Loganathan NatarajanLAMP DeveloperCommented:
why don't you sum the column field in the SQL itself ? so that you can display it?
0
 
Loganathan NatarajanLAMP DeveloperCommented:
0
 
ValeriCommented:
In your .jsp in the loop where you print the values for each column you can calculate the sum for every column in the same time. After finishing the loop, you will have all of the sums for every column and you can add one more row explicitly that contains the sums of the columns. This is the easiest solution!
0
 
cofactorAuthor Commented:
Excellent
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now