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

Sort Date in Cross Tab. Please Help.

Status
Not open for further replies.

ddfff

MIS
Sep 27, 2002
125
US
I have a crosstab and am having a problem sorting.

The row for the crosstab should be the month of a date, startdate.

When I display the months as a number, month(startdate) the report sorts exacly as I want.

However, I need to display the month name (January). When I change to monthname(month(startdate)), the crosstab sorts with April first, not January.

How can I display the month as a string but still sort by the numeric value?

Using 8.5.

Thanks very much in advance.
 
Select the row field->group options and choose "A row will be printed for each month". Then choose "Customize group name"->Use a formula field for the group name->x+2 and enter:

monthname(month(startdate))

-LB
 
Thanks. It sorts correctly but now it repeats the month every time a record exists for a different year.

Example.

Jan
Feb
Mar
Apr
May
Jun
July
Aug
Sep
Oct
Nov
Dec
Jan
Fed
etc...

How can I edit the existing formula to group by month, regardless of year.

Thanks again.
 
Create a formula {@month}:

month({table.date})

Use this as your row field. Then highlight it->group options->customize group name->use a formula->x+2 and enter:

monthname({@month})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top