Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Pie chart to display top 5 Post Reply Post New Topic
Author Message
dutyfree
Newbie
Newbie


Joined: 21 Jul 2008
Online Status: Offline
Posts: 24
Quote dutyfree Replybullet Topic: Pie chart to display top 5
    Posted: 19 Jan 2009 at 7:13am
I am using pie chart to display the top 5 countries based on the values. For this, i created an advanced option where on the change of is country with TopN being 5 including others and show values is Pth pecentile (P=50) of @value percent.
The problem is that the pie chart percentage is showing as 52.2% for a country and the detail information below is showing 39.38% which is calculated based on value / total value * 100. The same formula is used for the pie chart as well.

Is this how its supposed to behave or should it show the correct value on the pie chart? How can i achieve the correct value.

thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Jan 2009 at 11:55am
HI Dutyfree,
It sounds like rather than limiting your report to only showing the top5 you are pulling in all the data then limiting the pie chart to the top5, correct?
By doing this the pie chart N giving you the percentages is calculating based on total sums for the top5 only rather than all records like the rest of your report, hence the differences in percentages (but not totals). I can't recall if there is a function within the pie chart to handle this or not. Try checking around in the Chart design to see if that can be handled. I don't have access to my Crystal today so I cannot check to see this right now.
You might have to make formula field to convert all the non-top5 records into a single group and include that in the pie chart to keep your N the same, show the top5 by name with totals/percentages and a 6th item as "Others" with a total and percentage with them.
Just some ideas to consider Approve
IP IP Logged
dutyfree
Newbie
Newbie


Joined: 21 Jul 2008
Online Status: Offline
Posts: 24
Quote dutyfree Replybullet Posted: 20 Jan 2009 at 1:28am
Yes absolutely right. I am pulling in all data and the pie chart is showing the percentages based on top5 but the option of others should take care of the rest of the percentages as per my understanding. I mean this is the whole idea of TOP5 right? Any easier way to do this rather than grouping and all that?

thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Jan 2009 at 8:04am
HI Dutyfree-
OK I checked and there might be a solution for you but I do not know what exactly the report design is or what you must display and how. I'll try to explain here but you may need to play with it based on how you are grouped, totally/summing and display requirements.
Under your Group1 on Countries:
1- use the group sort expert and fill it all in the info as you want based on your sums etc.
2 - click on the "Include Others with the Name" and call it whatever you need to..
You will notice now that you only have 6 groups in GH1, all of your non-type 5 countries have a group called "Others".
If you want to work around this and still need to group them individually add another group on your Country Name as group2. THis will regroup these "Others" into there respective individual countries. You can also suppress the group header1 to avoid showing duplicate names for the top5
GH1 - "Countries" as sort on top5 include others.
GH2 - "Countries"
Details
GF2
GF2 - sum/count for your percentages for your top5 pie chart
Does this make sense?
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.031 seconds.