Topic Options
#30046 - 12/06/11 01:47 PM Crystal Reports:group on one field sort on another
Henry Offline
Adagio Scholar

Registered: 03/28/08
Posts: 86
Loc: Burnaby, BC. Canada
Hi Expert,

I have a question about Crystal reports. I know there are lots of veterans here. In my Crystal reports, it is grouped by three fields. I want the report sorted by another field instead of group fields.

The report is as following:
Category#----Brand-----------SKU#------------Sales$
7---------------NatPath---------55702-----------60.00
7---------------NatPath---------55700-----------20.00
7---------------NatPath--------subtotal--------80.00
7---------------Glut-------------55605-----------30.00
7---------------Glut-------------55610-----------20.00
7---------------Glut-------------55609-----------10.00
7---------------Glut------------subtotal--------60.00
7---------------Foods-----------55545-----------30.00
7---------------Foods-----------55541-----------10.00
7---------------Foods----------subtotal--------40.00
7---------------Subtotal-------------------------180.00
8---------------Delicious-------55299-----------20.00
8---------------Delicious-------55242-----------10.00
8---------------Delicious------subtotal--------30.00
8---------------Bliss------------53036-----------20.00
8---------------Bliss-----------subtotal--------20.00
8---------------Purely----------55216-----------10.00
8---------------Purely---------subtotal--------10.00
8---------------Subtotal-------------------------60.00

The group fields are:
Category#
--------Brand
----------------SKU#

I want the report sorted by field Sales$ in Descending order.
ie.
Inside each group Brand, the records are sorted by field Sales$ in descending order.
Inside each group Category#, the groups Brand should be sorted by field Sales$ (subtotal number)
Groups Category# can be sorted by itself in ascending order.

Any help will be appreciated!

Bruce Ma

Top
#30049 - 12/06/11 02:16 PM Re: Crystal Reports:group on one field sort on another [Re: Henry]
Softrak Support Offline

Adagio Action Team

Registered: 03/09/99
Posts: 11520
Loc: Vancouver, BC Canada
Hi Bruce,

In Crystal Reports, it is a requirement that sorting is first done by all fields selected as Groups. And then any other fields can be used for sorting.

If you want to have a tertiary sort by Sales$ descending (after Category and Brand), then you cannot have a group by SKU. Based on your posted results, you probably don't as the records are not sorted by SKU.

Just click on the Sales$ field in the Detail section, go to the Reports menu and pick Sort Records. Then add the Sales$ field to the sort list and choose Descending.
_________________________
Regards,
Softrak Tech Support

Top
#30109 - 12/08/11 09:47 AM Re: Crystal Reports:group on one field sort on another [Re: Softrak Support]
Henry Offline
Adagio Scholar

Registered: 03/28/08
Posts: 86
Loc: Burnaby, BC. Canada
Thanks for you reply.
First of all, the table posted is what I want. I don't know how to get it yet.
Secondly, I have to group by SKU because still there are details inside SKU. What I mean is that for each SKU, the Sales$ field is a summary. That's why I still need to group by SKU.

I have searched on Internet and lots of people mentioned this problem. some perple implemented it using formula in the group field. I don't how to do that.

I appreciated your guide if you could give me some suggestion.

Bruce

Top
#30112 - 12/08/11 10:09 AM Re: Crystal Reports:group on one field sort on another [Re: Henry]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
Hi Bruce,

There are Adagio consultants who can help you with the complexities of Crystal Reports. It can do almost anything you can imagine, but there's a pretty steep learning curve. There are many companies offering training in Crystal Reports if you want to scale that mountain yourself.

Generally, you are better off asking for help in the creation of a couple of reports, and then using those as models for the variations that are required.
_________________________
Andrew Bates

Top
#30118 - 12/08/11 11:39 AM Re: Crystal Reports:group on one field sort on another [Re: Retired_Guy]
Softrak Support Offline

Adagio Action Team

Registered: 03/09/99
Posts: 11520
Loc: Vancouver, BC Canada
Try this.
From the Reports menu, pick the Top N / Sort Group Expert.
Find the tab related to the 3rd Group (by SKU).
Choose ALL, based on the Subtotal of Sales$ by SKU. Sort Descending.

For me, this resorted the Group 3 Footer records by the Sales$ subtotal, rather than the Group 3 name.
_________________________
Regards,
Softrak Tech Support

Top
#30169 - 12/13/11 08:13 AM Re: Crystal Reports:group on one field sort on another [Re: Softrak Support]
Henry Offline
Adagio Scholar

Registered: 03/28/08
Posts: 86
Loc: Burnaby, BC. Canada
Sorry I didn't mention that I am using crystal reports in .NET framework. I haven't found what you mentioned Top N / Sort Group Expert.
When I open a crystal reports file, there is a Crystal Reports menu on the top. Click Crystal Reports, there is a Report option. There are lots of option under Report. The menu structure is:
Crystal Reports
Report
Select Expert...
Selection Formula
Record...
Group...
Formula Workshop...
-----------------------
Section Expert...
Group Expert...
Group Sort Expert...(Grey)
Hierarchical Grouping Options...
Record Sort Expert...
-------------------------
Report Options...
Set Print Data and Time...
Summary Info...

Any idea will be appreciated.

Thanks,

Bruce

Top
#30170 - 12/13/11 10:18 AM Re: Crystal Reports:group on one field sort on another [Re: Henry]
Softrak Support Offline

Adagio Action Team

Registered: 03/09/99
Posts: 11520
Loc: Vancouver, BC Canada
Hi Bruce,

This forum support is only available for Crystal Reports 8.5 for Adagio. If you attempting to use anything different, then we cannot assist you.

If you are using Crystal Reports for Adagio, then on the Report menu, the 'Top N/Sort Group Expert' appears about halfway down the list, between 'Change Group Expert' and 'Hierarchical Grouping Options'. It will be grey and inaccessible until a Group has been created (ie a subtotal).

Based on what you posted, it is possible that the 'Group Sort Expert' you mentioned is what is required, provided that you have at least one Group Section defined.
_________________________
Regards,
Softrak Tech Support

Top
#30222 - 12/18/11 08:27 AM Re: Crystal Reports:group on one field sort on another [Re: Softrak Support]
Henry Offline
Adagio Scholar

Registered: 03/28/08
Posts: 86
Loc: Burnaby, BC. Canada
Thank you Softrak Support. I appreciate it.

Bruce

Top


Moderator:  Christa_Meissner 
Who's Online
0 registered (), 78 Guests and 0 Spiders online.
Key: Admin, Global Mod, Mod
Forum Stats
1865 Members
5 Forums
14448 Topics
70593 Posts

Max Online: 432 @ 01/20/25 10:17 PM
April
Su M Tu W Th F Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30