This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JSP and the fly likes display reports in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "display reports in jsp" Watch "display reports in jsp" New topic
Author

display reports in jsp

Rangini Ramchander
Greenhorn

Joined: Dec 22, 2004
Posts: 8
how do display the total salary(down xyz goup, lmn group) in jsp?
eg: cash noncash
xyz 12 15
13 17
15 10
------------------
total: 40 42

lmn 10 20
21 30
5 7
----------------------
total: 35 57

for total i written the query select sum(cash)as cash sum(noncash) as noncash from table, it retuned the total list of values in action class, i am able to get the values in action class but in jsp i am not able to print the total values.
i am using struts, i am able to print the list of people in jsp, but how to disply the total value after the xyz group, lmn group.

the code i am using jsp page is;
bean:write name="payment" property="totalcashamt" /></td>
<bean:write name="payment" property="totalnoncashamt" />

Action class:

ArrayList totalcash=new ArrayList();
totalcash=paylist.getTotalcash(con, fname,lname,city);

DAO:
SELECT SUM(CASH_AMT) AS TOTALCASHAMT, SUM(NON_CASH_AMT) AS TOTALNONCASHAMT FROM DM_HD where firstname='' or lastname=''' city="" group by Entity_paid_src_id ORDER BY FRST_NM ASC
chaitanya karthikk
Ranch Hand

Joined: Sep 15, 2009
Posts: 806

Can you explain in details?


Love all, trust a few, do wrong to none.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: display reports in jsp