?
Solved

column wise total

Posted on 2013-01-25
4
Medium Priority
?
1,102 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1220 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month13 days, 2 hours left to enroll

777 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