Recently, I was working on a customization for AP – > Payments report (Accounts payable -> Payments -> Payment journal -> Lines -> Print -> Payments and I noticed that the report is not filtering the data correctly based on the filter criteria specified using SysQuery form as shown below for Account number 1001:



As you can see from the above output that report is showing the records against Account number 1002 as well, whereas I have selected 1001 from SysQuery form. I, then dig into the code and found that the code is not taking the report query with filter criteria applied and hence the data isn’t showing correctly on report.

To resolve the above issue, I have made a small change to retrieve the report query which contains the filter criteria user selected on the form and then this query gets inserted in the Query contract map as shown below:


Now run the report and you should see the filtered results on the report based on the criteria defined under SysQuery form.