nepaliKeta
Programmer
Hi all,
i'm trying to generate a report based on a two step date filter and it is not working with both filters.
The report should display 2003 2004 and 2005 data as of the end of year if it were run in Jan 2006, but if it is run after jan 2006, it should give data as of the end of previous month of last two years like "as of jan 31 2004" and "as of jan 31 2005".
some of my logics are follow but don't work.
if ([current month]<>01) then ([order year]>=[current year]-2) else ([current year]=[current year-1])
====================
if([currentmonth]=01) then ([year] between ([currentyear]-3) and ([currentyear]-1)) else ([year]>=[currentyear]-2)
================================
if([currentmonth]<>01) then ([year]>=[currentyear]-2) else if ([currentmonth]=01) then ([year]between ([currentyear]-3) and ([currentyear]-1)) else null
================================
i'd appreciate any help
thanks
i'm trying to generate a report based on a two step date filter and it is not working with both filters.
The report should display 2003 2004 and 2005 data as of the end of year if it were run in Jan 2006, but if it is run after jan 2006, it should give data as of the end of previous month of last two years like "as of jan 31 2004" and "as of jan 31 2005".
some of my logics are follow but don't work.
if ([current month]<>01) then ([order year]>=[current year]-2) else ([current year]=[current year-1])
====================
if([currentmonth]=01) then ([year] between ([currentyear]-3) and ([currentyear]-1)) else ([year]>=[currentyear]-2)
================================
if([currentmonth]<>01) then ([year]>=[currentyear]-2) else if ([currentmonth]=01) then ([year]between ([currentyear]-3) and ([currentyear]-1)) else null
================================
i'd appreciate any help
thanks