IF GReportDate = 0D THEN GReportDate := WORKDATE; GYearFormular := '-' + FORMAT(GNoOfMonths) + 'M'; GMonthDates[1] := CALCDATE('CM',GReportDate); GMonthDates[1] := CALCDATE(GYearFormular,GMonthDates[1]); GMonthDates[2] := CALCDATE('-CM',GMonthDates[1]); IF GMonthDates[2] < 080809D THEN GMonthDates[2] := 080809D + 3; LItemLedgEntriesREC.RESET; LItemLedgEntriesREC.SETCURRENTKEY("Item No.","Posting Date"); LItemLedgEntriesREC.SETRANGE("Item No.","No."); LItemLedgEntriesREC.SETRANGE("Posting Date",GMonthDates[2],GReportDate); IF LItemLedgEntriesREC.FINDLAST THEN BEGIN SETFILTER("Date Filter",'%1',GMonthDates[2]); END;
Comments
Message('%1 %2',GMonthDates[1],GMonthDates[2]);
use below statements
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav