on 07-08-2013 8:30 AM
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.