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

crosstab dates

Status
Not open for further replies.

Tracey

Programmer
Oct 16, 2000
690
NZ
hi, i have a crosstab report which lists amounts / month. To display the month names I have the following formulas:

@incidentbymonth =
DatePart ("m",{INCIDENT.INCIDENT_DATE} ,1 )

@monthname =
MonthName ({@incidentbymonth})

Works great, but the report sorts these alphabetically.

Could someone tell me how to keep these in date order??

cheers
 
In 8.5 you can specify the group sort order by changing the group options in the format cross-tab options.

I can't remember which version this was introduced in. Andrew Baines
Chase International
 
Another way to deal with this is to group on a formula which controls the sort order i.e

this is something ive used for days but im sure it will work with months, by giving each instance a number
select {course.Course Planned Day of Week}
case 'MONDAY': 1
case 'TUESDAY' : 2
case 'WEDNESDAY' : 3
case 'THURSDAY' : 4
case 'FRIDAY' : 5
case 'SATURDAY' : 6
case 'SUNDAY' : 7

this way when you group the order will be specified by the number
 
Hi

thanks guys, a combination of both your advise and voila :)

I used the case, but still needed to group within the format crosstab options.

cheers [cheers]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top