cancel
Showing results for 
Search instead for 
Did you mean: 

Group Sorting with drill available

Former Member
0 Kudos

Dear all,

I have a rather complicated chart as below. I want to write a crystal report containing a chart (stacked bar chart) with x-axis being the Date value and y-axis being the count, with values ordered by type (e.g. 000-100, 101-200, 201-300, etc.) as well, e.g.

2013/1/1: 201-300 (1), 301-400 (2)

2013/1/2: 000-100 (3), 301-400 (1)

If I set the report of layout "Group" with Grouping by Date (Asc) and then Type (Asc), I am able to drill through the chart. However, the "groups" are ordered in the legend "strangely", i.e., first by date and then type, and therefore the groups are in this order:

000-100

301-400

201-300

and not in order as expected (000-100->201-300->301-400 or the reversed value).

If I set the report of layout "Advanced" with Grouping by Date (Asc) and then Type (Asc), the grouping is correct, i.e.,

301-400

201-300

000-100

However, I cannot drill in this way.

I am not care about the textual content of the report and therefore if there is any alternative to order the group in the legend, it is fine for me as well.

How can I achieve both goal, i.e., correct grouping order (in the legend) and drilling available?

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Please find attached the report with testing data.

The report uses Group (not CrossTab nor Advanced) for layout.

Thanks.

abhilash_kumar
Active Contributor
0 Kudos

Hi Stephen,

Could you try creating a Crosstab and base the chart off of it?

The Crosstab would need two rows, 1st being the Date and the next row being the Type. The Summary field would have the Count. You can then right-click the Crosstab and insert the Stacked Bar Chart.

Does it work this way? Also, is this just a Legend Sorting issue or the Chart sorts in the same manner too?

-Abhilash

Former Member
0 Kudos

Hi,

Thanks. I will try your suggestion later.

Actually, as I don't care about the textual content (actually I hide all of them in my report), my main purpose is to sort the legend.

However, I don't know how to sort the legend according to my will (the types in my data is dynamic and therefore cannot be "hardcoded" in the rpt), I have to sort the Chart in order to sort the legend. If you have any suggestion on this issue, please let me know, too.

Stephen

abhilash_kumar
Active Contributor
0 Kudos

The sort order of the Legend depends on the sort order of the Chart, you're right.

Do you have a screenshot of the chart please?

-Abhilash

Former Member
0 Kudos

Dear Sir,

I have tried CrossTab. Grouping is ok but drilling is no longer available (similar to use Advanced).

The screen captures are as attached:

1 Using CrossTab: Order is correct but drilling is disabled:

     1.1 Cross-Tab Expert

1.2 Chart Expert:

1.3 Chart:

We can see that the data in legend are in order.

(The effect is similar to using Advanced instead of CrossTab)

2 Using Group: Order is incorrect but drilling is enabled

2.1 Chart Expert:

2.2 Chart:

I think the order is as follow: the first item (in 11/1/2009) is within the group 0490001-0500000, and therefore the group 0490001-0500000 is the first (bottom-most) item in the legend. Then the second item (18/10/2009) is within the group 1190001-1200000, therefore the group 1190001-1200000 is the second item in the legend, and so on.

Please help.

Thanks.

abhilash_kumar
Active Contributor
0 Kudos

Would you be able to attach the report with saved data if that's possible?

To attach the report change its extension from .rpt to .txt and click the 'use advanced editor' link in the reply window.

-Abhilash