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

Group by one value, sort by another

Status
Not open for further replies.

harwooddale

Programmer
Feb 7, 2003
40
GB
Hi,
Using Crystal 9 developer edition.

I have a list of animals, with their parents name and a value that I need to sort on within a group.

Data looks like:

Animal Parent Value
Lamb1 Ewe1 10
Lamb2 Ewe1 11
Lamb3 Ewe2 10.5
Lamb4 Ewe3 12

I would like it to be ordered by value descending, and then grouped. i.e

Ewe1
Lamb1 10
Lamb2 11

Ewe2
Lamb3 10.5

Ewe3
Lamb4 12

I have tried sorting the report by Value and then grouping by parent and vice versa with no success.

Any help would be gratefully appreciated.
 
harwooddale,

Are there any other groups on this report? From the data you provided, you should be able to Group By "Parent", then Sort Ascending by "Value" (smallest to largest) and I can't see a data reason why this wouldn't work.

Hope this helps!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Hi Mike,

That's what I thought, but I need the sort to place the lowest value first which is 10, then place all the other values for the same parent in the same group, then the next lowest value (if not selected previously) which is 10.5 grouped by parent etc.
I know this is none standard, but if it can be done I will be a happy man.

Thanks
 
If you insert a minimum on the value field at the Ewe level, you can then go to report->group sort and select minimum of value to sort the ewe groups.

-LB
 
Hi LB,

I have tried what you suggested but the 'Group sort expert' button is greyed out. Any ideas?

Thanks
 
You have to actually place the value field on the detail section and right click on it->insert summary at the group level--in order to activate the group sort feature.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top