cancel
Showing results for 
Search instead for 
Did you mean: 

Method for sorting of a legend

Former Member
0 Kudos

I am using CR8.5 and CR2008. There are a few reports with line charts for the years with the data points at each month. Sometimes the legend for the chart is not ordered. In my research to find why the legend sometimes sorts and sometimes doesn't, I found that if the first data point has a value, those years are ordered first. As more years have data points later in the chart, I find that they are ordered below.

Example:

Jan-2008: 100

Feb-2008: 150

Mar-2008: 125

Jan-2009: 105

Feb-2009: 155

Mar-2009: 120

Jan-2010: 100

Feb-2010: 150

Mar-2010: 125

The legend is ordered as 2008, 2009, 2010.

Feb-2008: 150

Mar-2008: 125

Jan-2009: 105

Feb-2009: 155

Mar-2009: 120

Jan-2010: 100

Feb-2010: 150

Mar-2010: 125

The chart above would have the legend showing as 2009, 2010, 2008.

Although as a user I don't like this logic, does this seem to be a problem? If it is has a solution been provided?

Thank you,

Jim

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ,

The following might help you.

Right click on Chart and Select u201CChart Expertu201D -> u201CDatau201D tab.

Select the field from u201COn Change Of Fieldu201D

Then u201COrderu201D button will enable.

Click on the u201COrderu201C Button , it will opens u201CChart Sort Orderu201D window.

From the Drop down box select any one of the Sort Order.

or select Specified Order, then give your order of dates.

It will reflect on your chart legends.

Cheers,

Praveen G

Former Member
0 Kudos

That does not work. If a chart has lines for 2007, 2008, 2009, and 2010; and Jan exists for 2008, 2009, and 2010, they will be sorted. If Feb 2007 is the first month for 2007, that will be appended in the legend. The order is set to Ascending for the year but that fails to be sorted visually in the legend (CR 8.5 and CR2008). The report is using a stored procedure to return results. The filters are defined by the user at run-time.

Former Member
0 Kudos

I think I found the issue, the first On Change Of was by month in original order. The year was second which was ascending order. I need to modify to sort the year first and then the month.

Former Member
0 Kudos

Hi

Create a formula to concatenate month and year and insert the formula as your On change of group to arrive year wise sorting.

Or

You can very well specify the order using u2018Specify the orderu2019 option under sort options.

Thanks,

Sastry