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

GROUP SORTING

Status
Not open for further replies.

FEROZKHAN

Programmer
May 30, 2002
12
US
Hi,
I am new to crystal reports. I am using verson 10 . My requirement is I have got three groups. 1. Continet, 2.Region, 3. Country. The Sorting should be the Continents, and then within the continents, the regions and within Regions the Countries. The regions are named as R01,R02,R03..., R45. Now in North America, Canda has region R01, as well as R15. and Europe has region R13 as well as other regions. When I sort , Canda comes after Europe, where as it should fall in North America. IS there anyway to fix it . Please help.
Thanks

The Desired Result
North America
R01
CANADA
R02
CANADA
R15
CANADA
R10
US
EUROPE
R06
FRANCE
R07
GERMANY
R13
U.K.
 
What results do you get if you group on continent, then on region, and then on country?

-LB
 
It looks to me like you want to group by
1. continent
2. country
3. region
since you want all of Canada together before U.S.
MrBill
 
Define your own formula field, and then use it to group (which will work for as long as the formula checks nothing except the properties of individual records). Do something like
Code:
if {your.region} in [R01, R02, R10, R15] 
     then "a) North America"
else if {your.region} in [R06, R07, R13]
     then "b) Europe"
     else "c) Other"

Saying "a) North America" rather than "North America" means it will sort ahead of Europe, without the need to adjust sorting (which can be done).

I hope this helps.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top