Solved

column wise total

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Suggested Solutions

Title # Comments Views Activity
Custom Java Application connects to database: Which one of the 20? 4 35
tomcat administrtor 12 61
Running JavaFX on JDeveloper 12C 1 55
java example issue 5 26
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
The viewer will learn how to implement Singleton Design Pattern in Java.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

828 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