why create a formula in the record selection...as Sharona alluded to.
something like:
local numbervar aYear := Year(CurrentDate);
local datetime endDate := CurrentDate;
endDate := CDate(MONTH(endDate), 1, YEAR(endDate); //first of the month
endDate := DateAdd("d", -1, endDate); //last day of previous month
if MONTH(endDate) < 5 then aYear := aYear - 1; //adjust the fiscal year
{table.dateField} in CDate(5, 1, aYear) to endDate
this will return a true or false, if true, the record is in the dataset, if false it is excluded.
HTH
Edited by lockwelle - 23 Aug 2011 at 3:38am