REPORTFORM;V_4.frf
TITLE;ใบเบิกสินค้าเพื่อจัดส่ง (แสดงรายละเอียด)
SQL;select arcard.AREA, area.ADESC, invmst.XSGROUP, ivgroup.IVGDESC , 
SQL;invcard.ID, invmst.XDESC, arcard.ACCID, armst.XCOMP, 
SQL;sum(invcard.QUAN) as QUAN, invcard.UNIT, sum(invcard.MQUAN) as MQUAN
SQL;from invcard 
SQL;inner join armst on arcard.ACCID = armst.ACCID
SQL;inner join arcard on invcard.DOCNO = arcard.DOCNO
SQL;inner join invmst on invcard.ID = invmst.ID
SQL;left join area on arcard.AREA = area.AID
SQL;left join ivgroup on invmst.XSGROUP = ivgroup.IVGID
SQL;group by arcard.AREA, invmst.XSGROUP, invcard.ID, invcard.ACCID
SQL;order by arcard.AREA, invmst.XSGROUP, invmst.XDESC, armst.XCOMP
CONDITION;ตั้งแต่ เส้นทาง~ARCARD.AREA~Chr~2~SELECT AID FROM AREA~AREA
CONDITION;ตั้งแต่ วันที่~ARCARD.DATEDOC~Date~2~~
USECROSSTAB;N
CROSSTABFRF;N
CROSSTABHEAD;
CROSSTABFIELD;
