Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Specified Order Option produces Wrong Order on Chart

Status
Not open for further replies.

Nassy

Programmer
Mar 27, 2003
121
GB
Hi

I have produced a report which shows the number of Leavers in different Age categories each Month. My report has two groups:

[ul][li]Employee Age[/li] [li]Month[/li][/ul]

The second group Month is a group based on an 'End Date' field, which is formatted to show Month and Year.

I also have a formula @monthly which extracts the month name from the date so 'Jan 2002' becomes 'January'


The Problem:

I put a record selection in my report to show only 1 years data. I then created a bar chart to show the number of leavers in each age group each month.

This means that in the 'On Change Of' Section I have:
Age
@Monthly

When I view the chart all seems fine except for the fact that the Months that are displayed on the legend are all in the wrong order. I know that @Monthly is a string so I tried to apply a Specified Order to this field in the Chart Expert. But to no avail. Crystal seemed to ignore my ordering.


Any help on this issue would be much appreciated as the ordering on the legend of my leavers chart has left me baffled!

Nassy
 
If the only problem is that it's a string, convert the @Monthly to a value, as in:

val(@monthly)

-k
 
You don't mention what type of chart this is.. but if there are multiple data points (as in a stacked bar etc) then crystal will order them in the order that they are found. Consider specified order of 1,2,3,4,5 grouped on A,B,C

say your first group A has points for 1,3,5 and group B has
all of them 1,2,3,4,5.. the legend will read 1,3,5,2,4.. your specified order.. but as it finds them in the groups..

Very aggravating!!

There is a cure. *IF* you can get the data to display properly in a crosstab (you can hide it.. it just has to be on the report) *AND* you create a specified order in the crosstab, then if you base your graph on the crosstab, everything works the way you want it too..

Lisa

 
Thanks for the replies.

I was using a stacked graph. I have since tried graphing off the cross-tab (luckily my report already had a cross tab in it with exactly the same info as my graph). Creating my graph from the cross tab was not something I had considered but this did solve my problem and seems the ideal workaround!

Nas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top