Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: "top N" reports Post Reply Post New Topic
Author Message
KanadianKevin
Newbie
Newbie


Joined: 19 Aug 2013
Online Status: Offline
Posts: 12
Quote KanadianKevin Replybullet Topic: "top N" reports
    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?
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet 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
IP IP Logged
KanadianKevin
Newbie
Newbie


Joined: 19 Aug 2013
Online Status: Offline
Posts: 12
Quote KanadianKevin Replybullet 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.
IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet 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
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet 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
IP IP Logged
KanadianKevin
Newbie
Newbie


Joined: 19 Aug 2013
Online Status: Offline
Posts: 12
Quote KanadianKevin Replybullet 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.
IP IP Logged
KanadianKevin
Newbie
Newbie


Joined: 19 Aug 2013
Online Status: Offline
Posts: 12
Quote KanadianKevin Replybullet 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!
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.015 seconds.