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

Can't seem to understand sorting & topn stuff 2

Status
Not open for further replies.

lareya

Technical User
Jan 30, 2003
49
US
Hi,
Is there someplace/where I can find info on the topN and sorting? I can't seem to make heads and tails, and have tried hundreds of different ways for my formulas and info to be all wrong. I asked a question here re: my report, but I didn't understand the suggested solution. I really need to make a ranking report, but now I am just banging my head.

Thanks
Lareya p.s my thread was here #913749 posted 9/8/04

BTW, Why does it say technical user by my name? It should be newbie!

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Crystal 8.5; ORSOS/One Call Hospital Scheduling System v9.3; SQL database; Huge Newbie to Crystal! Operating Room RN Analyst
 
If you open your post you'll see right under the title the thread ID, if you copy and paste that it will make a hyperlink to it rather requiring people to go search for it so that they might help you.

When you signed up, you selected technical user as your title.

If your previous post was anything like this one I can understand why they weren't able to help.

Here's the basic information to post if you want tailored answers:

Crystal version
Database/connectivity used
Example data
Expected output

-k
 
In a high level overview ...
Sorting refers to individual records - you can select any field, and ascending or descending sequence

Groups let you agregate (summarise) the data. Groups are done before sorts, so take precedence.

TopN/Group Sort, let you sort the Groups by the summary. So you have to have groups and summaries before you can select this option?

Now what are you trying to do? What isn't happening the way you want?

Editor and Publisher of Crystal Clear
 
-k

I can see why you used vampire in your name!! She explaine that she is new to the board - perhaps a little respect and a gentler approach is in order?

Maybe you don't realize how strong you come accross in your posts - my guess is you are scaring off some would-be posters.
 
Okay, here is the link to my original question. all the facts about my set up is in my sig line so I won't ever leave it out of my posts.


but I guess I was asking Here about a good reference book or online reference. The book I have Crystal reports (the complete reference) doesn't have a huge section on forumulas or TopN.

thanks for your help all :)

Lareya

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Crystal 8.5; ORSOS/One Call Hospital Scheduling System v9.3; SQL database; Huge Newbie to Crystal! Operating Room RN Analyst
 
Hi Lareya,
Top N is one of those things that eveyone thinks that everyone else knows about already - hence the dearth of information on this topic.

As mentioned above, Top N will only work if you have 2 things:
1.) Groups
2.) Summarized fields

Instead of sorting your groups alphabetically by name, as is the default, Top N allows you to sort the groups by the value of a summarized field.

If you just choose Top N and then pick a value for N, you'll notice that there's no way to parameterize this. You just give it a number (eg 5) and it'll show you the Top 5 Groups, based on the summarized field you chose. Anything NOT in the Top 5 gets dumped into the "Others" group, which you may choose to show or not.

If you need a "parameterized" Top N, where you get to pick the value for N, then you just need to modify the steps a little bit.

First, Instead of choosing "Top N" in the Top N Sort/Group Expert, choose "Sort All".
Then choose your summarized field from the drop-down list.
Choose the Descending Radio Button. Click OK to close.

Now, create a Numeric type parameter.(you could put some restrictions on the range of this Number)

In the Section Expert, choose to suppress the section required if the Group Number is higher than the amount you specify in your parameter.




Bob Suruncle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top