Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ideas for - Double date filter in a crosstab

Status
Not open for further replies.

nepaliKeta

Programmer
Oct 19, 2005
1
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top