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!

Cross-Tab month order

Status
Not open for further replies.

MadCatmk2

Programmer
Oct 3, 2003
145
GB
Hi

I'm probably not going about this the right way so i need a bit of help. I have a crosstab that i want to have 12 rows (one for each month) the columns are the years and the summarised fields are a count of the contacts made within each month on the given year. The rows are built using a formula which takes the month part of a date field, This number is then put in to a case statement which outputs the month name relevant to the number. This all works fine apart from the fact that the ccross-tab orders the months field alphabetically instead of the order that the months come in. Is there a way that i can alter the cross tab so that it shows the months in the ordeer that they are intended?

Thanks
 
Aha sorted!

it was the specified order within the row field of the cross tab. it works now that i've specified the order.
 
One other suggestion for this is to use the DateSerial function for the month. This way Crystal will sort the months correctly and you just need a small formula such as MonthName(Month(DateField)) to display the proper name.

This is useful if, instead of a calendar year, you want to see the last 12 months. The DateSerial will then allow you to easily sort over years because if you just use Specified Ordering then December will always appear after January irrespective of the year.

Just my $0.02
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top