Solved

How to sort group by different field in Crystal Reports

Posted on 2014-03-31
5
2,210 Views
Last Modified: 2014-04-07
I have a Crystal Report that groups by an identifier field but I want it to sort by a different field. There is always a one to one relationship between the identifier field and the sort order field.
0
Comment
Question by:Morgs77
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 34

Assisted Solution

by:Brian Crowe
Brian Crowe earned 200 total points
ID: 39966499
Why can't you just group by the "different" field?
0
 
LVL 35

Accepted Solution

by:
James0628 earned 300 total points
ID: 39968907
If it really is one to one, then I agree, it seems like you could just group by the other field.  But if you can't, or don't want to, do that for some reason ...

 What version of CR are you using?  I think some of them may have an option in the group options to change the sort order.  I'm using CR 10 and it does not have that option, but I think later versions may.

 Otherwise, the usual way to handle this would be to group by the other field first, and then your current field.  You can suppress the extra group header and footer if you like.  I suppose a potential down side to this is that the values for the sorting group will be shown in the group tree.  I don't know of any way to get around that.

 James
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 39976964
WHile it makes sense to group by the other field you can try this idea

Put the field on the report in the detail section
Right click the field
Click INSERT ==> SUMMARY
Set the summary to be MAXIMUM
Set it to insert in the group footer
Click OK

Click REPORT  -->  GROUP SORT OPTIONS
Set for ALL RECORDS
Choose the Summary field

mlmcc
1
 

Author Closing Comment

by:Morgs77
ID: 39980538
Thanks for the help. It was all complicated by hierarchical grouping which didn't work properly when grouping by the 'other field' first. I managed to get around this with a few adjustments to the SQL View.

Works great now. Thanks.
0
 
LVL 35

Expert Comment

by:James0628
ID: 39984075
Ah.  I've never used hierarchical grouping, so I'm not sure how that would affect things.  I'm glad you were able to figure it out, and glad I could help.

 James
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question