REPORTFORM;FIX12.frf
TITLE;Report ตรวจนับทรัพย์สิน
SQL;SELECT fixmst.FIXID, fixmst.FIXDESC, fixmst.DPTID2,
SQL;depart2.DDESC,
SQL;fixmst.FIXGROUP,  fixmst.REMARK,
SQL;fixmst.SERIAL, fixmst.BRAND, fixmst.MODAL, 
SQL;fixmst.DPTID, fixmst.COST, fixmst.SUPPLIER, 
SQL;fixmst.ACCDOC, 
SQL;fixgroup.FIXGROUPDESC,  depart.DDESC, fixpic.XPIC
SQL;FROM fixmst
SQL;LEFT JOIN fixgroup ON fixmst.FIXGROUP = fixgroup.FIXGROUP
SQL;left join depart on fixmst.DPTID = depart.DID
SQL;left join depart as depart2 on fixmst.DPTID2 = depart2.DID
SQL;LEFT JOIN fixpic ON fixmst.FIXID= fixpic.ID
SQL;ORDER BY fixmst.dptid,fixmst.DPTID2, FIXID
CONDITION;ตั้งแต่รหัส แผนก~FIXMST.DPTID~Chr~2~SELECT DID FROM DEPART~DEP
EXCELSQL;SELECT fixmst.FIXID AS "New Code", fixmst.FIXDESC As "Asset Name", fixmst.REMARK AS "หมายเหตุ", 
EXCELSQL;fixmst.DPTID2 AS "รหัสแผนกที่ดูแล", depart2.DDESC AS "ชื่อแผนกที่ดูแล",
EXCELSQL;fixmst.FIXGROUP AS "Asset Group", 
EXCELSQL;fixmst.SERIAL AS "SN.", fixmst.BRAND AS "ยี่ห้อ", fixmst.MODAL AS "รุ่น", 
EXCELSQL;fixmst.DPTID AS "Cost Center", fixmst.COST AS "Purchase", fixmst.SUPPLIER AS "Vendor Name", 
EXCELSQL;fixmst.ACCDOC AS "Invoice No.",
EXCELSQL;fixgroup.FIXGROUPDESC AS "Asset Group Name"
EXCELSQL;FROM fixmst
EXCELSQL;LEFT JOIN fixgroup ON fixmst.FIXGROUP = fixgroup.FIXGROUP
EXCELSQL;left join depart on fixmst.DPTID = depart.DID
EXCELSQL;left join depart as depart2 on fixmst.DPTID2 = depart2.DID
EXCELSQL;ORDER BY fixmst.DPTID2,fixmst.FIXID
