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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rotating Period for Group

Status
Not open for further replies.

satinsilhouette

Instructor
Feb 21, 2006
625
I need to have an accounting period, which controls the grouping(s) rotate. Here is the example:

Period 01 - Period 12 should be shown first in the report
Period 02 - Period 01
Period 03 - Period 02
Period 04 - Period 03
Period 05 - Period 04, etc.

so if the Posting date is in May, then April should be the first period, then the next month, May would be the first group listed and April would be the second.

April
March
February
January
December 10
November 10
October 10
September 10
August 10
July 10
June 10

The next month the report is run is June, it should group like this:

May
April
March
February
January
December 10
November 10
October 10
September 10
August 10
July 10
June 10

How do I get it to rotate like that? I have the specified order set up - but there has to be something that triggers it to rotate.

Thanks!

Thanks so much!
satinsilhouette
 
Do you have one field called {table.period}? Is it a number or a string field? How does it display when placed in the detail section?

-LB
 
In retrospect, it looks like you need to group on your datefield on change of month in descending order. Then your record selection should be:

{table.date} in dateserial(year(currentdate),month(currentdate)-12,1) to
dateserial(year(currentdate),month(currentdate),1)-1

-LB
 
LBass - I didn't even think about that. That is like too simple. But Thank you!

Thanks so much!
satinsilhouette
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top