Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Phsical date field in the report is not showing

(0) ShareShare
ReportReport
Posted on by 3,090

2311.png4212.png

Dear Experts,

I want to show Physical date field in the report but it is missing help and check my code below.

[
SRSReportQueryAttribute (querystr(IssuedQty)),
SRSReportParameterAttribute(classstr(MNRMPMIssueQtyContract))
]
public class MNRMPMIssueQtyDP extends SRSReportDataProviderBase
{
MNRMPMIssueQtyTmp MNRMPMOnhandTmp, MNRMPMOnhandTmpLocal;
InventTrans inventTrans;
// InventTransOrigin inventTransOrigin;
// InventDim inventDim;
InventSum inventsum;

TransDate toDate;


}

[SRSReportDataSetAttribute("MNRMPMIssueQtyTmp")]
public MNRMPMIssueQtyTmp getMNRMPMOnhandTmp()
{
select * from MNRMPMOnhandTmp;
return MNRMPMOnhandTmp;
}

public void insertIntoTmpTable()
{

MNRMPMOnhandTmpLocal.ItemId = inventTrans.ItemId;
MNRMPMOnhandTmpLocal.ItemName = inventTrans.itemName();
//MNRMPMOnhandTmpLocal.inventBatchId = inventdim.inventBatchId;
MNRMPMOnhandTmpLocal.inventBatchId = inventsum.inventBatchId();

MNRMPMOnhandTmpLocal.DatePhysical= inventTrans.DatePhysical;

//MNRMPMOnhandTmpLocal.wMSLocationId = inventdim.InventLocationId;
// MNRMPMOnhandTmpLocal.UnitId = InventTable::find(inventTrans.ItemId).inventUnitId();
MNRMPMOnhandTmpLocal.UnitId = inventTrans.inventUnit();

MNRMPMOnhandTmpLocal.Qty = inventTrans.Qty !=0;
MNRMPMOnhandTmpLocal.insert();


}


private void insertSum()
{

while select sum(Qty) from MNRMPMOnhandTmpLocal group by ItemId, ItemName, UnitId, InventBatchId
{
MNRMPMOnhandTmp.ItemId = MNRMPMOnhandTmpLocal.ItemId;
MNRMPMOnhandTmp.ItemName = MNRMPMOnhandTmpLocal.ItemName;
MNRMPMOnhandTmp.inventBatchId = MNRMPMOnhandTmpLocal.inventBatchId;
//MNRMPMOnhandTmp.wMSLocationId = MNRMPMOnhandTmpLocal.wMSLocationId;
MNRMPMOnhandTmp.UnitId = MNRMPMOnhandTmpLocal.UnitId;
MNRMPMOnhandTmp.Qty = MNRMPMOnhandTmpLocal.Qty;
MNRMPMOnhandTmp.insert();

}
}

public void processReport()
{

Query query;
QueryRun queryRun;

MNRMPMIssueQtyContract contract;

query = this.parmQuery();

contract = this.parmDataContract();

toDate = contract.parmToDate();


query.dataSourceNo(1).addRange(fieldnum(InventTrans, DatePhysical)).value(queryRange(mkDate(1,1,2010), toDate));

queryRun = new QueryRun(query);


while(queryRun.next())
{
MNRMPMOnhandTmpLocal.clear();


inventTrans = queryRun.get(tablenum(InventTrans));
inventsum = queryRun.get(tablenum(InventSum));
if(inventTrans.DatePhysical !=dateNull())

this.insertIntoTmpTable();
}
this.insertSum();


}

Best Regards,

Shabir 

  • Blue Wang Profile Picture
    on at
    RE: Phsical date field in the report is not showing

    Hi Shabir,

    Do you debug your code? Is it inserted into the temporary table correctly? Inserted correctly but not displayed?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,001 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,833 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans