It's not a secret anymore!
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
JavaRanch » Java Forums » Java » JSP
Bookmark "display reports in jsp" Watch "display reports in jsp" New topic

display reports in jsp

Rangini Ramchander

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);

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:
subject: display reports in jsp
jQuery in Action, 3rd edition