Print Page | Close Window

How to sort pie chart by value in descending order

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
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=14756
Printed Date: 05 May 2024 at 5:35am


Topic: How to sort pie chart by value in descending order
Posted By: TC Tran
Subject: How to sort pie chart by value in descending order
Date 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



Replies:
Posted By: DBlank
Date Posted: 24 Oct 2011 at 7:26am
group sorting applies to the legend as well


Posted By: TC Tran
Date 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


Posted By: DBlank
Date 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.


Posted By: TC Tran
Date 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!


Posted By: DBlank
Date Posted: 24 Oct 2011 at 9:53am

waht value are you showing in the pie chart?



Posted By: TC Tran
Date 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


Posted By: DBlank
Date 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.



Print Page | Close Window