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

Top N Report - not working

Status
Not open for further replies.

peggys

Technical User
Feb 21, 2003
24
US
I am trying to use the Top N functionality in Crystal and it is not working. It is ignoring the field that I want to sort on. Has anyone else experienced this problem? If so, how did you fix it?

Peggy
 
Yes, it is counting the number of records within a group.

Peg
 
No, the TopN is for the group within which I am doing the count. Is this the problem?
 
If you describe exactly what you are grouping on and what you are trying to achieve, it would be easier to suggest a solution.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
I am counting the number of electrical outages that occured within a substation, feeder and phase grouping. I want the records to spill out in descending order by the number of outages. I have groupings on substation, feeder and phase. Within the phase group I am doing the count to get my number of outages. I want to sort descending within the group by this number.
 
TopN should let you sort the "phase" groups by the count for each "phase" but, obviously, it can't sort the records "within" each phase group by that count.

Are you saying you can't use TopN to sort the Phases by their count?

hth,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
That is what I'm saying. I can't figure out why it won't work. I'm trying to sort the phase group by the count.

Peg
 
If Phase is your 3rd group level, and you topN at this group, then CR will rank the Phases within each Feeder group, not within all phases in the report. Is that what you want?

If you are trying to find the TopN phases in the report, you would have to group differently, probably on a formula that combines Substation+Feeder+Phase.

What happens when you set up the TopN now, nothing? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
Thank you! That makes perfect sense.

Peggy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top