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

Dates Not Sorting Properly

Status
Not open for further replies.

Bennie47250

Programmer
Joined
Nov 8, 2001
Messages
515
Location
US
CR version 7.0 Access Database.

I have a simple report that looks at the current week’s sales and summing up the number of units shipped for the week. The report will run on Saturday and I’m using the date range function “WeekToDateFromSunday” to gather the records. I have only one group which is the invoice date.

I would like to see the report sorted by the invoice date, but I can’t seem to get it to do this. The Sort Order is set to “Group 1 – Invoice Date” and the Group Expert has the Field set to Invoice Date, in ascending order, section printed for each day.

The report is sorting like this 06/19/2002 is 1st 6/20/2002 is 2nd, 6/21/2002 is 3rd, 6/17/2002 is 4th, 6/18/2002 is 5th. How can I get it to sort like 6/17/2002, 6/18/2002, 06/19/2002, 6/20/2002, 6/21/2002?

Thanks
 
Crystal sometimes makes too many assumptions... :o)
Since you already use Invoice Date for Grouping,
Crystal doesn't let you add that field as a sort criterion.

Create a formula that simply returns the Invoice Date.

Then, go to Report, Sort Records...
and add that formula as a sort under the Group.

Cheers,
- Ido
CUT (Crystal UTilities): e-mailing, exporting, electronic bursting & distribution of Crystal Reports:
 
This does not remedy the situation

To make certain I understood your suggestion, what I did was create a Formula named “date” and in the formula I added the Invoice date field. And added this to formula to the sort after the group.

Does it make any difference if this is a Date Time field? I have tried formatting the field as a date only but this had no effect of the results.

Thanks Again
 
That's odd. You can bounce your report (with saved data)
to me at ixm7@psu.edu and I'll have a closer look.

Cheers,
- Ido CUT (Crystal UTilities): e-mailing, exporting, electronic bursting & distribution of Crystal Reports:
 
Thanks for the offer. However I did find the problem, the Top N/Sort Group had an entry, removed it and now is sorting correctly.

Thanks Again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top