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!

TopN and Ranking :help w/ formula

Status
Not open for further replies.

lareya

Technical User
Jan 30, 2003
49
US
I have created a report that shows providers and procedures. I have grouped on the providers. I have Record sort order the procedures to descend. I have the procedures TopN by most freq. I have counted each procedure. It looks like this:

Code:
Provider            Procedure
Dr x                 Proc a
                     Proc b
                     Proc b
                     Proc c
                    
DrY                  Proc a
                     Proc c

Dr Z                 Proc d
		     Proc e  

Most Freq proc: Proc b
sub total Proc: 8

I would like to rank the procedures by providers and have a running total by providers with a grand total

Provider            Procedure        Rank
Dr. X                Proc a           2
                     Proc b           1 
                     Proc b           1
                     Proc s           2   

Top proc: b count of 2
count 4

Dr. Y                Proc a           1
                     Proc c           1
                     Proc g           1 
                     Proc b           1
                     Proc s           1

Top proc na
count: 4

Dr. Z                Proc b           1
                     proc f           2
                     Proc g           1
                     Proc b           1
                     Proc s           1

Top proc b count of 2
count 5

 etc., 

Totals               Top Freq Proc s count of 7
                     total count 14


There are over 100 different kinds of Procedures, But they need to be ranked so we can know who does the most procedures (I have that), who does the most procedures that are the same, and which is the most frequent procedure that gets done. Like proc s where enough providers do it, but not enough times to count as the most frequent cases for them individually.

Then I will hide the details and have a summary report.

Thank you!
lareya (Please see my sig for details)


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Crystal 8.5; ORSOS/One Call Hospital Scheduling System v9.3; SQL database; Huge Newbie to Crystal! Operating Room RN Analyst
 
If you want to group or rank the same data in several different ways, then you'll need to put subreports in the report footer. Do a 'save as' to duplicate the report, then choose Subreport under Insert and then Choose a subreport. After that you can modify the subreport to get the totals you need.

Subreports make a lot of work for computers, but save time for humans. You decide which is more important for your particular circumstances. Where I work, we go to a lot of trouble to make our mainframe screens and reports run efficiently. We use Crystal mostly for investigations and management information, cases where it doesn't much matter if a job takes twice as long because the user can be doing something else in the meantime.

Madawc Williams (East Anglia)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top