Print Page | Close Window

"top N" reports

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2022
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=20028
Printed Date: 02 May 2025 at 10:15am


Topic: "top N" reports
Posted By: KanadianKevin
Subject: "top N" reports
Date Posted: 17 Sep 2013 at 8:43am
Hi!

So I've been asked to develop a report that shows the top 10 most frequent incidents we have. So I've selected the fields they want to see and I get a report that shows for any given category, subcategory, and product type there are N rows corresponding to incidents. What I want to be able to show is category, subcategory, product type, and the count of # of incidents for that product type and then sort by the count and limit it to the top 10 highest values. What would be the easiest way to accomplish this?



Replies:
Posted By: kostya1122
Date Posted: 17 Sep 2013 at 9:39am
first group by
incidents
create a summary formula like count(incidents ,incidents )
then go to group sort expert
choose top n set
where n is: 10
choose based on count incidents


Posted By: KanadianKevin
Date Posted: 17 Sep 2013 at 10:01am
The group sort expert is unselectable (greyed out). I've grouped by incident number and created that formula but I can't get the group sort expert to become selectable.


Posted By: praveeng
Date Posted: 17 Sep 2013 at 10:06am
To enable Group sort expert you need to place a summary value in the Group footer. Then Group Sort expert will enable you to apply sorting/Top N..
 
--Praveen G


-------------
Praveen Guntuka,
praveen_guntuka@yahoo.com


Posted By: kostya1122
Date Posted: 17 Sep 2013 at 10:07am
you need a summary in your group
try putting
incidents field in details section then right click it
click insert >> summary>>
>> "calculate this summary" count>> "summary location" group


Posted By: KanadianKevin
Date Posted: 17 Sep 2013 at 10:25am
Sorry - I'm really new so maybe I've not understood the instructions. That didn't give me what I was trying to do. Why would you group by incident number? That just gives me a few thousand groups of one member. I would have thought grouping by product type would make more sense since there is a 1 to N relationship between product type and incident number and that's what we're trying to capture.


Posted By: KanadianKevin
Date Posted: 17 Sep 2013 at 10:31am
Ah that's exactly what I had to do. I grouped it by product type and then did a group sort based on the count of incident number and took the top 10 and that worked. Thanks for your help!



Print Page | Close Window