void clicked()
{
int ret;
InventSum1
curSum;
utcDatetime start=dateTimeUtil::utcNow();
container conRec,conItem,conHeader;
inventTable
curITable
;
conHeader=["物料编号","物料名称","规格","单位","仓库","库位","批号","物理库存","物理预留","实际可用","供应商编号","供应商名称"];
for(curSum=inventSum1_ds.getFirst(1)
? inventSum1_ds.getFirst(1) : inventSum1_ds.cursor()
;curSum;curSum=inventSum1_ds.getNext()){
if(curSum.SumOfPhysicalInvent!=0 || curSum.SumOfAvailPhysical!=0){
curITable=inventTable::find(curSum.ItemId);
conItem=conNull();
conItem +=curSum.ItemId;
conItem +=curITable.itemName;
conItem +=curITable.Spec;
conItem +=curITable.inventUnitId();
conItem
+=curSum.InventLocationId;
conItem +=curSum.wMSLocationId;
conItem +=curSum.inventBatchId;
conItem
+=curSum.SumOfPhysicalInvent;
conItem
+=curSum.SumOfReservPhysical;
conItem
+=curSum.SumOfAvailPhysical;
conItem +=curSum.VendAccount();
conItem +=curSum.vendname();
conRec=conPoke(conRec,conLen(conRec)+1,conItem);
}
}
exportCon2Xls(conRec,conHeader);
return;
}
原文地址:http://www.cnblogs.com/AllenFeng/p/3772927.html