• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

display reports in jsp

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 806
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you explain in details?
 
reply
    Bookmark Topic Watch Topic
  • New Topic