REPORTFORM;RC7.frf
TITLE;รายงานการซื้อ แสดง Serial #
SQL;select apcard.ACCID, apmst.XCOMP,
SQL;invcard.ID, invmst.XDESC,
SQL;apcard.DOCNO, apcard.DATEDOC, invcard.QUAN, invcard.QTYCUT,
SQL;invcard.UNIT,
SQL;sin.SERIAL
SQL;from apcard left join invcard on apcard.DOCNO = invcard.DOCNO
SQL;left join apmst on apcard.ACCID = apmst.ACCID
SQL;left join invmst on invcard.ID = invmst.ID
SQL;inner join sin on invcard.DOCNO = sin.DOCNO and invcard.LINE = sin.TRLINE
SQL;where left(apcard.DOCNO,2) = "RC"
SQL;order by apcard.ACCID, apmst.XCOMP, invcard.ID, invmst.XDESC, sin.SERIAL, apcard.DOCNO, apcard.DATEDOC
CONDITION;ตั้งแต่รหัสเจ้าหนี้~APCARD.ACCID~Chr~2~SELECT ACCID FROM APMST ~AP
CONDITION;ตั้งแต่รหัสสินค้า~INVCARD.ID~Chr~2~SELECT ID FROM INVMST~INV
CONDITION;ตั้งแต่วันที่~APCARD.DATEDOC~Date~2~~
USECROSSTAB;N
CROSSTABFRF;N
CROSSTABHEAD;
CROSSTABFIELD;
