Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Count for TOP N Post Reply Post New Topic
Author Message
rajasan77
Newbie
Newbie


Joined: 17 Apr 2009
Online Status: Offline
Posts: 6
Quote rajasan77 Replybullet Topic: Count for TOP N
     Posted: 15 Apr 2010 at 8:05am
I have to find the count for TOP N. N is any number.

For example, If I have to find the top 10 diagnosis used by doctor, I know how to find the top 10 diag by using the Group sort expert.

But, I want to count the total of top 10 diag used.

GH1: Dr.Smith
GH2. Dx1         count: 80
GH2. Dx2         count: 70
GH2. Dx3         count: 70
GH2. Dx4         count: 60
GH2. Dx5         count: 55
GH2. Dx6         count: 50
GH2. Dx7         count: 45
GH2. Dx8         count: 40
GH2. Dx9         count: 30
GH2. Dx10        count: 20

Now I want the count of (80+70+70+...+20) in GH1. If I use the summary function then that counts all the diags for that DR. that are NOT in top N.

I Just want the count only Top N(10)
Any help???
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 16 Apr 2010 at 4:30am
I'm sure that you can use a Running Total, and DBlank is the master of them. 
 
I use formulas/variables, which could be set up to run in the group header.
standard for formulas:
1 formula to reset on change of gh1 (doctor)
1 to increment in gh2 using count()
1 to display total, probably in GF1
 
HTH
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum