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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Order of values in the Legend of a stacked bar graph (Crystal 9)

Status
Not open for further replies.

PhilB2

Programmer
Nov 6, 2003
133
US
My stacked bar graph Legend, for a row that is ordered specifically and consists mostly of month names, sorts nearly correctly for one set of data (only a straggler is out of order), but for another, January appears after December. I've read threads in Google and in Tek-Tips, to no avail.
 
Hi, If your data starts at the end of year 1 into year 2, could your groups be Year & month rather than Months (1 -12)?
This would make Jan(month 1 year 1) appear before Dec(month 12 year 2), where you just want Jan-Dec - regardless of year.
Instead of group by month, group by month number using Datepart:

DatePart ("m",{yourdatefield})Returns just the month number 1-12
so
DatePart("m",(currentdate)) returns 10

 
I should have been clearer that the values are literal strings, not dates, and do not correspond directly to dates. For this purpose, they could be "apple, box, cat, dog, 2015, 2016, xylophone". Also, my record selection criteria include only one year.
 
Then I'd double check the source data.
Check there's not a space before the "J" in January.
 
For one set of data, January is in the right place; for another set, it appears after December. The field being reported on is a single selection field (drop-down).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top