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

Sort then group 1

Status
Not open for further replies.

kusnier

Technical User
Nov 14, 2003
3
PL
I have problem with sorting and grouping correctly. Basically my database returns something like:
VALUE GROUP ORDER
--------------------
23 G1 100
73 G2 200
344 G2 300
64 G1 400
534 G3 500
235 G3 600
255 G3 700
25 G1 800
75 G1 900

Now what I need is data grouped by GROUP and in order by ORDER. I will show or hide detail groups (different then G1) So I will have

G1 only

NOW THERE IS THE PROBLEM:
How to show Group 1 splitted by details group in between to have it like

G1 100
G2 300
G1 400
G3 700
G1 800

This is for purpouse of showing Balance Sheet with or without details.
 
One note grouping by VALUE is NOT an option becouse this will give me wrong DrillDowns which should be as
G1 showing only general view
G2 (details group let's say "Assets")
G3 (details group 2 .... etc)
 
I'm not sure I follow what you're trying to do. It helps to say which version of Crystal. But I think that all of them insist that the Group be the highest sort keys. You can say 'Specified Order', but only for known values.

Madawc Williams
East Anglia, Great Britain
 
When you are trying to group on one field but sort on another, the trick is to append the fields in a formula (Group onto the Order) and then group on the formula.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Tips and Tricks / Guide to Crystal in VB
- tek@kenhamady.com
 
Ken,

Can you provide more details on how to create the formula? Thanks.

Mike
 
The formula would look something like:

{table.Order} + {Table.Group}

Group on this formula. You will probably want to delete the Group Name Field and replace it with the two original fields, so that they aren't displayed smushed together.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Tips and Tricks / Guide to Crystal in VB
- tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top