Report Design
 Crystal Reports Forum : Crystal Reports 9, X, XI, 2008, 2011 : Report Design
Message Icon Topic: How to sort pie chart by value in descending order Post Reply Post New Topic
Author Message
TC Tran
Newbie
Newbie


Joined: 24 Oct 2011
Online Status: Offline
Posts: 11
Quote TC Tran Replybullet Topic: How to sort pie chart by value in descending order
    Posted: 24 Oct 2011 at 7:07am
Hello everyone,
 
I am fairly new to Crystal Reports and I have just created a pie chart using the data from our ODBC SQL database.  My pie chart has 12 different slices with different values and it is currently sorted alphabetically by the label names.  How can I change the option to have it sorted by the value instead of lable?  I am needing to sort the value in the pie chart in descending order.  I've tried to look everywhere but cannot figure out how this can be done.  Any help you could guide me through would be greatly appreciated.
 
Thank you,
TC


Edited by TC Tran - 24 Oct 2011 at 7:08am
IP IP Logged
DBlank
Senior Member
Senior Member


Joined: 19 Dec 2008
Online Status: Offline
Posts: 7797
Quote DBlank Replybullet Posted: 24 Oct 2011 at 7:26am
group sorting applies to the legend as well
IP IP Logged
TC Tran
Newbie
Newbie


Joined: 24 Oct 2011
Online Status: Offline
Posts: 11
Quote TC Tran Replybullet Posted: 24 Oct 2011 at 7:50am

Hello DBlank,

Thank you for the prompt response!  I'm sorry but could you possibly guide me through the process?  I opened the Group Sort Expert but cannot find the sort option to sort the legend.
 
Thank you,
TC
IP IP Logged
DBlank
Senior Member
Senior Member


Joined: 19 Dec 2008
Online Status: Offline
Posts: 7797
Quote DBlank Replybullet Posted: 24 Oct 2011 at 8:01am
you would have to have the rst of the report designed as group ed on the same item your pie chart is grouped on and a summary of whatever you are summarizing in the pie chart (like the sum of sales).
Fromt here you can use group sorting to sort your groups in the report asc or desc on that group summary value. This will also sort your pie cahrt legend. If you need the rest of your report to be different you would have to make your pie chart a subreport follwing the same guidelines.
IP IP Logged
TC Tran
Newbie
Newbie


Joined: 24 Oct 2011
Online Status: Offline
Posts: 11
Quote TC Tran Replybullet Posted: 24 Oct 2011 at 9:43am

Thanks for your prompt response again!  I'm a bit confused and don't know where to start.  With my current level of knowledge I don't know enough to be able to re-organize the data to rearrange the report to be able to sort it.  Currently, I have a main chart displaying a total of 12 different categories in the Report Header section followed by 12 supporting charts in the Group Header 1 section (1 sub-chart for each of the 12 categories in the main chart).  Is there an easier way to get this done?  Cystal Reports is not so user friendly when it comes to chart hah?

Thank you!
IP IP Logged
DBlank
Senior Member
Senior Member


Joined: 19 Dec 2008
Online Status: Offline
Posts: 7797
Quote DBlank Replybullet Posted: 24 Oct 2011 at 9:53am

waht value are you showing in the pie chart?

IP IP Logged
TC Tran
Newbie
Newbie


Joined: 24 Oct 2011
Online Status: Offline
Posts: 11
Quote TC Tran Replybullet Posted: 25 Oct 2011 at 4:26am

DBlank, thank you so much for your valuable time!  I was able to figure out the easier route already.  I specified the TopN sort option in Chart Expert to sort ALL in descending order and that did it.  Thanks again and have a great day!

TC
IP IP Logged
DBlank
Senior Member
Senior Member


Joined: 19 Dec 2008
Online Status: Offline
Posts: 7797
Quote DBlank Replybullet Posted: 25 Oct 2011 at 4:34am
thanks for posting your solution.
I had not used the TopN inside the chart "on Change of" before. Nice to know that it is available.
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.109 seconds.