Solved

column wise total

Posted on 2013-01-25
4
1,096 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 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

690 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