REPORTFORM;ST8.frf
TITLE;สรุปจำนวนสินค้า/มูลค่า แต่ละคลังแยก Brand
SQL;select invcard.ID,invmst.XBRAND, brand.BDESC, sum(invcard.REPBAL) as XBAL,
SQL;sum(invcard.COSTREPBAL) as XCOSTBAL, invmst.UNIT, invmst.XDESC,
SQL;invcard.LOCID, loca.LOCDESC
SQL;from invcard 
SQL;left join invmst on invcard.ID = invmst.ID 
SQL;left join brand on invmst.XBRAND = brand.BID
SQL;left join loca on invcard.LOCID = loca.LOCID
SQL;where ( invmst.xgroup = '01' or invmst.xgroup = '02' )
SQL;group by invmst.XBRAND, brand.BDESC
SQL;order by invcard.LOCID,invmst.XBRAND, invcard.ID,invmst.XDESC
CONDITION;ตั้งแต่ Brand ~INVMST.XBRAND ~Chr~2~SELECT BID FROM BRAND ~BRA
CONDITION;ตั้งแต่รหัสสินค้า~INVCARD.ID ~Chr~2~SELECT ID FROM INVMST ~INV
CONDITION;สิ้นสุด ณ วันที่ ~INVCARD.DATEDOC ~Date~1~<=~
