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

Group by different from sort by

Status
Not open for further replies.

Corinne113

Programmer
Jan 5, 2009
1
US
Crystal Reports XI

I need to know how I can do the following:

I need to group by a owner ID field and then want to sort by the owner last name. Sounds simple but once I create the grouping it is automatically sorted by that Owner ID field. Can anyone help me out with this??

Thanks!
 
Create a formula

@Owner
OwnerlastName&totext(OwnerID,0,"")

Only need totext if ID is a number if string

OwnerlastName&OwnerID


Group on this field, in Insert Group options customise GroupName use Owner Last name field.

This way if you have duplicate owner names they will still split out and you can still list by last name.

Ian

 
Or you could group by Surname at Group1 and suppress.

Then in OwnerID group customise again with Surname or even Surname and Firstname

Ian
 
Group by ID, and then insert a maximum on the Name field. Then go to report->group sort and select "All" and use maximum of Name as your group sort field->ascending.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top