Hi
I want to filter records in Purchase Order <= Posting Date Filter in Report.
Thanks
*This post is locked for comments
Hi
I want to filter records in Purchase Order <= Posting Date Filter in Report.
Thanks
*This post is locked for comments
Hi,
You can define your start date initially if required. Then you need to write the below setfilter code.
PurchaseHeader.SETFILTER("Posting Date", '<=%1', StartDate);
Hello,
Use SETFILTER:
StartDate := 01072017D;
"Purchase Header".SETFILTER("Posting Date", '..%1', StartDate);
This will produce this filter: "..01/07/2017".
Check the Enter Criteria Filters on MSDN: msdn.microsoft.com/.../hh879066(v=nav.90).aspx
Hi
How to filter Posting Date as <= StartDate . Start Date is a variable.
Thanks
HI Jsshivalik,
This image?
In the ReqFilterFields field you can select fields from the table. More info about ReqFilterFields on MSDN: https://msdn.microsoft.com/en-us/dynamics-nav/reqfilterfields-property
Hello, if you have a development Environment then Open the Purchase Header Table ID [38] and add bellow code in function "SetSecurityFilterOnRespCenter"
Hi
Can u show the first image complete . I want Posting Date <= DateFrom
Thanks
Hi Jsshivalik,
If you are using the Purchase Header as a data item you can add the Posting Date field in the ReqFilterFields property for example:
When the users run the report, they don't have to manually add the field to the filters, they can just type in a filter like the below:
If you would like to handle this in your C/AL code, add a Global Variable with type Date and add it to a field on the request page.
Then you can add a SETFILTER to your PurchaseHeader - OnPreDataItem
SETFILTER("Posting Date", '%1..', DateFrom);
In this case you can also default the value of the date variable to TODAY or WORKDATE.