I made a DP class and controller class and the query attribute above DP class to make Records to include tab appear in the report Dialog.
The problem is: when I add some values in the query filter and debug the DP class I find those ranges are applied to the query
but the actual Report shows all fields without any filters!
this is DP Class:
[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();
}
}
}
and this is Controller Class:
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();
}
}
This is the query value when I debug:
as you see the ranges are included but the result report doesn't show the values depending on this query!
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))