REPORTFORM;PA3.frf
TITLE;รายงานสรุป ค่าใช้จ่ายตามแผนก ผังบัญชี
SQL;SELECT exptail.GLID, glmst.GLDESC, SUM(invamt) AS INVAMT, SUM(vatamt) AS VATAMT, SUM(amount_l) AS AMOUNT_L ,
SQL;exptail.DPTID, depart.DDESC
SQL;from exptail inner join glmst 
SQL;on exptail.GLID = glmst.GLID
SQL;left join depart on exptail.DPTID = depart.DID
SQL;group by exptail.GLID, glmst.GLDESC, exptail.DPTID, depart.DDESC
SQL;order by exptail.DPTID, exptail.GLID
CONDITION;ตั้งแต่รหัสแผนก~EXPTAIL.DPTID~Chr~2~SELECT DID FROM DEPART~DEP
CONDITION;ตั้งแต่วันที่~EXPTAIL.DATEDOC~Date~2~~
