Solved

column wise total

Posted on 2013-01-25
4
1,075 Views
Last Modified: 2013-02-12
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
Comment
Question by:cofactor
  • 2
4 Comments
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 38817837
why don't you sum the column field in the SQL itself ? so that you can display it?
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 38817841
0
 
LVL 16

Accepted Solution

by:
Valeri earned 305 total points
ID: 38818732
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
 

Author Closing Comment

by:cofactor
ID: 38880081
Excellent
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Suggestion on WebSite Template Sites 6 83
Securing Jmx Console and web console 2 65
eclipse formatting 6 73
How to convert String matching to regex in java 4 21
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now