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

Conditional Group Sort

Status
Not open for further replies.

mwhager

IS-IT--Management
Jun 8, 2000
27
0
0
US
I have three groups in my report which are currently using a unique specific order sort for each of the groups. I have a need for the second group to sort differently based on the first group.

So for example, if the first group is equal to X, the second group would sort a certain way, but if the first group is equal to Y, the second group would sort a different way.

The third group will always stay sorted the same.

Is this possible and how might I achieve this?

Thanks for the help.
 
Crystal 8.5 sorts by group, according to the group hierarchy. I'm pretty sure that there's no way to alter this mode of operation.

What you might be able to do is to alter the field used for the second on the basis of the first group. I've never personally tried this and you'd have to see if the Group 1 field was 'visible' from the Formula Field controlling Group 2. If not, you'd need to duplicate the Group 1 logic, something like that.

Madawc Williams
East Anglia, Great Britain
 
I think Madawc is correct, you can get round this by grouping on formulas.

Create a group on a formula like.

If {Group1Field}= X and (other group2 conditions)then "Subgroup2" else
If {Group1Field}= X and (other group2 conditions)then "Subgroup3" else
etc.....
If {Group1Field}= Y and (other group2 conditions)then "Subgroup2a" else
If {Group1Field}= X and (other group2 conditions)then "Subgroup3a" else
Other

Note that for for the Y condition names are slightly different, then in you specified grouping window set the grouping in the order that you require.

NB this only works if you know all the conditions and they are unlikely to change. However, as above add an "Other" group so when that starts appearing in your reports you know something has changed.

Ia Waterman
UK Crystal Reports Consultant
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top