[SRSReportQueryAttribute(queryStr(OnHandListQuery))]
class ADCOnHandListReportDP extends SRSReportDataProviderBase
{
OnHandListTmp onHandListTmp;
[SRSReportDataSetAttribute(tableStr(OnHandListTmp))]
public OnHandListTmp getOnHandListTmp()
{
select onHandListTmp;
return onHandListTmp;
}
public void processReport()
{
Query q = this.parmQuery();
QueryRun qr = new QueryRun(q);
while(qr.next())
{
InventSum inventSumRecord = qr.get(tableNum(InventSum));
InventDim inventDimRecord = qr.get(tableNum(InventDim));
InventTable inventTableRecord = qr.get(tableNum(InventTable));
onHandListTmp.clear();
onHandListTmp.ItemId = inventSumRecord.ItemId;
onHandListTmp.ItemName = inventSumRecord.itemName();
onHandListTmp.UnitId = inventSumRecord.inventUnitId(inventSumRecord);
onHandListTmp.InventLocationId = inventDimRecord.InventLocationId;
onHandListTmp.ItemGroupId = inventTableRecord.itemGroupId();
onHandListTmp.PhysicalInventory = inventSumRecord.physicalInventCalculated();
onHandListTmp.insert();
}
}
}
class ADCOnHandListReportController extends SrsReportRunController
{
public static ADCOnHandListReportController construct()
{
return new ADCOnHandListReportController();
}
public static void main(Args _args)
{
ADCOnHandListReportController controller = ADCOnHandListReportController::construct();
controller.parmArgs(_args);
controller.parmReportName(ssrsReportStr(ADCOnHandListClassReport,PrecisionDesign1));
controller.startOperation();
}
}
SELECT dataAreaId, InventDimId, Deducted, InventLocationId, ItemId, Ordered, Picked, PostedQty, Received, Registered
FROM InventSum(InventSum)
WHERE ((InventLocationId = N'10101101'))
JOIN dataAreaId, ItemId, ItemType, NameAlias
FROM InventTable(InventTable)
ON InventSum.ItemId = InventTable.ItemId
AND InventSum.dataAreaId = InventTable.dataAreaId
JOIN dataAreaId, inventDimId, InventLocationId
FROM InventDim(InventDim)
ON InventSum.InventDimId = InventDim.inventDimId
JOIN ItemId, ModuleType, UnitId
FROM InventTableModule(InventTableModule)
ON InventSum.ItemId = InventTableModule.ItemId
AND InventSum.dataAreaId = InventTableModule.dataAreaId
AND ((ModuleType = 0))