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!

TopN as a parameter 1

Status
Not open for further replies.

BigC72

MIS
Oct 15, 2004
69
US
I am using CR XI sp1 querying a DB2 database. I have reports in which I group by procedure code and total for each occurence/use of the procedure code and then apply a TopN for lets say the top 50 or 100 codes used by a physician. Is there a way that I can create a parameter by which an end user can choose their own TopN value? Say top 40 codes rather than 50 or whatever other example....Is this a possibility?
 
Actually, starting with Crystal XI, the N for TopN has an expression button. All you need to do is create the parameter and use it in that expression.

- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Good afternoon Ido,

This is Travis in Lake Charles....thanks for the tip!! Worked perfectly......
 
Ido, can I ask ya something about this?

Would that also work if the topN that I am after is sorted off of numeric text? I have a report with a formula to convert numeric text tonumber and that works rather well - would I be able to put a topN parameter to go after that?
 
groovy. I am trying to get the topN to sort in another report that looks at numerictext and it is falling quite short. I have no cluse what I did. The formula is:

if numerictext{contact1.key1} then tonumber{contact1.key1} else 0.

works great - nice and simple. So I made a group and sorted it descending and then went to the topN and asked for top 100. You'd think that I'd get back the top 100 key1's. I get more and of course being me, I really meant company names. so I added another group for company and told the topN to get top 100 company names but I think that I need to join the two together and I am drawing yet another blank.
 
TopN is referring to sorting groups, not sorting detail records.

Please start a new thread and explain what you need to do.

- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top