Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stock Report
Message
From
22/05/2002 08:55:43
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
22/05/2002 07:52:12
Khurram Khan
Filtrona Pvt Ltd.
Karachi, Pakistan
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Miscellaneous
Thread ID:
00659825
Message ID:
00659843
Views:
25
>I want the stock report which is consist on two table
>purchase and sales.
>but not with coding use SQL
>on in four to five line coding for this report
>
>Report Format:
>
>Item Stock Report
>
>Item Name : Foxpro CD Version 7.00
>
>Doc # Date Receipt Qty issue Qty Balance Qty
>
>Opening Qty 2
>___________________________________________________________
>110 01/01/02 5 7
>112 02/02/02 3 4
>113 04/02/02 2 6
>__________________________________________________________
>Total 7 3 4
>__________________________________________________________
>
>
>
>Receipt qty will be bring from purchase table and issue qty will be from sales table
>
>Please use the SQL Command.

Roughly :
select st.ItemName, st.ItemKey, ;
 nvl(pr.transno, nvl(rc.transno, sl.transno)) as 'transno' ;
 nvl(rc.qty,0) as rcptqty, ;
 nvl(pr.qty,0) as purchqty, ;
 nvl(sl.qty,0) as salesqty ;
 from stock st ;
 left join purchase pr on st.ItemKey = pr.ItemKey ;
 left join receipt rc on st.ItemKey = rc.ItemKey ;
 left join sales sl on st.ItemKey = sl.ItemKey ;
 order by st.ItemName, TransNo ;
 into cursor crsReport
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform