Home » Developer & Programmer » Reports & Discoverer » Report Out put
Report Out put [message #206212] Wed, 29 November 2006 03:42 Go to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
I used this code in formula column and result is :

YarnCode Mqty Cons Net
100001 1200 50 600
100001 2200 70 1540

but I want total of both rows like:

YarnCode Net
100001 2140

I could not understand how it will be solved.


Please help.


Select sub1.yarn_code, sum(sub3.rmqty) mqty, SUB5.CONS, sub3.rmqty*sub5.cons/100 net  from 

(select y.yarn_code, y.balance Opn from yarn y group by y.yarn_code, y.balance) sub1,
 
(select p.ppno ppno, p.subpp subpp, p.req_date ETD, p.fabric_code, sum(s.req_kgs) RmQTY, p.b_code
 from  program p, sub_program s 
 where s.jobno = p.jobno  
--  and req_date not between :dd and :dd1
  group by p.ppno, p.subpp, p.b_code, p.fabric_code, req_date) sub3,

 (select l.fabric_code fabric_code, sl.yarn_code yarn_code, sum(sl.cons) cons
 from link l, sub_link sl
 where sl.jobno= l.jobno
 group by l.fabric_code, sl.yarn_code, sl.cons) sub5

where sub3.fabric_code = sub5.fabric_code (+)
and sub5.yarn_code = sub1.yarn_code (+)
and sub1.yarn_code = 100001
group by sub1.yarn_code, sub3.rmqty , sub5.cons

[Updated on: Wed, 29 November 2006 03:43]

Report message to a moderator

Re: Report Out put [message #206217 is a reply to message #206212] Wed, 29 November 2006 03:53 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
SUM(net) GROUP BY YarnCode
Re: Report Out put [message #206229 is a reply to message #206217] Wed, 29 November 2006 04:09 Go to previous message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
Thank you LF you gave me idea.

again Thank you some time little bit thing doesnt clear.
Previous Topic: Generate report into PDF programmatically
Next Topic: Report Formatting
Goto Forum:
  


Current Time: Tue Jul 02 17:26:02 CDT 2024