Hi Guys,
I been working on an SSRS report where I need to get some data on the Product Receipt Table.
My only problem is, how can I query the createdDateTime field in a while select statement and include the createdDateTime in the WHERE clause as range.
I already tried the below syntax without any errors when compiling, but when executing the report, it shows nothing.
Or can to tell me the alternative to get the same result?
I don't know what else to do, I am just new in the AX development.
Thanks in advance.
utcDateTime utcFromDate, utcToDate;
date dTFrom, dTTo;
TimeOfDay tFrom, tTo;
contract = this.parmDataContract();
dTFrom = contract.parmFromDate();
dTTo = contract.parmToDate();
tFrom = str2time("12:00:00 am");
tTo = str2time("11:59:59 pm");
utcFromDate = DateTimeUtil::newDateTime(dTFrom, tFrom, DateTimeUtil::getUserPreferredTimeZone());
utcToDate = DateTimeUtil::newDateTime(dTTo, tTo, DateTimeUtil::getUserPreferredTimeZone());
while select sum(Ordered), sum(Qty), sum(ValueMST) from vendPackingSlipTrans
group by CostLedgerVoucher, createdDateTime
where vendPackingSlipTrans.createdDateTime >= utcFromDate
&& vendPackingSlipTrans.createdDateTime <= utcToDate
&& vendPackingSlipTrans.Qty != 0
&& vendPackingSlipTrans.Qty >= 1
join vendPackingSlipJour
group by PurchId, PackingSlipId, OrderAccount
where vendPackingSlipJour.OrderAccount == contract.parmVendAccount()
&& vendPackingSlipJour.PackingSlipId == vendPackingSlipTrans.PackingSlipId
&& vendPackingSlipJour.PurchId == vendPackingSlipTrans.OrigPurchid
*This post is locked for comments
I have the same question (0)