Notifications
Announcements
No record found.
Hi
I want to filter records in Purchase Order <= Posting Date Filter in Report.
Thanks
*This post is locked for comments
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 - OnPreDataItemSETFILTER("Posting Date", '%1..', DateFrom);
In this case you can also default the value of the date variable to TODAY or WORKDATE.
Can u show the first image complete . I want Posting Date <= DateFrom
Hello, if you have a development Environment then Open the Purchase Header Table ID [38] and add bellow code in function "SetSecurityFilterOnRespCenter"
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
How to filter Posting Date as <= StartDate . Start Date is a variable.
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,
You can define your start date initially if required. Then you need to write the below setfilter code.
PurchaseHeader.SETFILTER("Posting Date", '<=%1', StartDate);
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.