REPORTFORM;IV4_JOE.frf
TITLE;รายงานการขายตาม ชนิดการขาย
SQL;select invcard.DOCNO, arcard.SALEID,  salemst.SNAME,
SQL;arcard.ACCID, armst.XCOMP,
SQL;invcard.DATEDOC, invcard.ID, invmst.XDESC,
SQL;invcard.QUAN, invcard.UNIT, invcard.PRICE,
SQL;invcard.AMOUNT_L , arcard.AMOUNT_D, invcard.disclamt  as disc,
SQL;invcard.vatamt, invcard.orddoc, invcard.invamt, invcard.discamt, arcard.advamt
SQL;from invcard 
SQL;left join invmst on invcard.ID = invmst.ID
SQL;left join arcard on invcard.DOCNO = arcard.DOCNO
SQL;left join armst on invcard.ACCID = armst.ACCID
SQL;left join salemst on invcard.SALEID = salemst.SID
SQL;where left (invcard.DOCNO,2) = "IV"
SQL;order by arcard.ACCID, invcard.DATEDOC, invcard.DOCNO
CONDITION;ตั้งแต่รหัสลูกค้า~INVCARD.ACCID~Chr~2~SELECT ACCID FROM ARMST~AR
CONDITION;ชนิดการขาย~ARCARD.SALETYPE~TextFile~1~SALETYPE_JOE.TXT~AR
CONDITION;ตั้งแต่วันที่~INVCARD.DATEDOC~Date~2~~
EXCELSQL;select invcard.DOCNO, arcard.SALEID,  salemst.SNAME,
EXCELSQL;arcard.ACCID, armst.XCOMP,
EXCELSQL;invcard.DATEDOC, invcard.ID, invmst.XDESC,
EXCELSQL;invcard.QUAN, invcard.UNIT, invcard.PRICE,
EXCELSQL;invcard.AMOUNT_L , arcard.AMOUNT_D, invcard.disclamt  as disc,
EXCELSQL;invcard.vatamt, invcard.orddoc, invcard.invamt, invcard.discamt, arcard.advamt
EXCELSQL;from invcard 
EXCELSQL;left join invmst on invcard.ID = invmst.ID
EXCELSQL;left join arcard on invcard.DOCNO = arcard.DOCNO
EXCELSQL;left join armst on invcard.ACCID = armst.ACCID
EXCELSQL;left join salemst on invcard.SALEID = salemst.SID
EXCELSQL;where left (invcard.DOCNO,2) = "IV"
EXCELSQL;order by arcard.ACCID, invcard.DATEDOC, invcard.DOCNO
USECROSSTAB;N
CROSSTABFRF;N
CROSSTABHEAD;
CROSSTABFIELD;
