How to get records in report based on posting date

i have created request page with two fields named as (from date) and (to date) and used the following code i.e

“G/L Entry”.SETRANGE(“G/L Entry”.“Posting Date”,“From Date”,“To Date”);

on G/L Entry - OnAfterGetRecord() trigger

though i am getting the results if enter dates from 31-12-2013 to 31-12-2014

but when i enter date from 31-12-2013 to 31-12-2013

i am getting only one record in the report.


Try to write that code on G/L Entry - OnPredataItem() trigger.

its working but when i enter dates from 31-12-2013 to 31-12-2013 then it is showing nothing.

Do you Got Records For that date

You need to write your code on the “G/L Entry - OnPredataItem( )” trigger and your code should work. Check if you have data for the date you are trying to filter.

everything is ok, but the dates i am trying to filter are the closing dates, the code i have written above is working for all normal dates but not for the closing dates, and also the date i am trying to filter have data…


please ,can anybody tell me what will be the syntax for closing date in this case…

You put a C in front of the date to mark it as an closing date, like