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

Changing Group Order Upon Change of Another Group 1

Status
Not open for further replies.

CBMC

Programmer
Nov 22, 2001
13
CA
I am using CR8 and the problem I have is this.
The first group I have is direction. The second group I have is a list of numbers.

When the direction is "NORTH" I want the second group to be ordered in descending order.
When the direction is "SOUTH" I want the second group to be ordered in ascending order.

i.e.
Group #1 --> NORTH
Group #2 --> 30 <- Group #2 ordered in descending order
29
..

Group #1 --> SOUTH
Group #2 --> 1 <- Group #2 ordered in ascending order
2
..


Is there an easy way to do this?
 
Hmmm you might try grouping on this formula for your second group

@Group2

If uppercase({table.directionField}) = &quot;NORTH&quot; then
{table.field}
else if uppercase({table.directionField}) = &quot;SOUTH&quot; then
{table.field} * -1
else
{table.field} // or add in cases for EAST and WEST

This should work if you then sort the resulting group &quot;descending&quot;
Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top