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!

Stacked Bar Graph Ordering

Status
Not open for further replies.

Gwired

IS-IT--Management
Sep 21, 2006
13
US
So,

I've built I Stacked Bar Graph and my group by is on Year-Month, so October would be 2006-10. The report data goes in perfect order... 2006-07, 2006-08, 2006-09, 2006-10 the stacked bar however appears as randomly as you can. Showing the 2006-08 data first, then 09 then, 10 and if they data has an 07 it sticks in on the end. How weird is that?
 
I believe that what is happening is it is not adding the group until it reaches a record with a value. So if the first file name has 2006-08 & 2006-09, then those get put first in the list. Next it continues on until it finaly hits 2006-07. Which then puts it out of order.
 
Have you tried sorting the whole report on the date field? I think that nulls could also affect the ordering.

-LB
 
Gwired, I have the same problem in a stacked bar graph. There are N data sets (X axis) and the Y axis is the percentage of data sets processed in 1..12 hours. The levels should be 1..12 but the first data set has charts processed in 1,2,3,4,5,6,7 and 10 hours. This results in the levels being 1..7,10,8,8,10,11. This appears to the observation made in your second post. My data set consists of three columns: data set name, hours to process and number of datasets. Where there are no datasets processed in an interval there is no record.
(lbass, is this what you meant by 'nulls'; missing records in the data set?.)

It appears to me that for the chart to work correctly, the first data set plotted must have a record for each level on the stacked chart. Looks like a bug or a pretty severe limitation.

Any suggestions for workarounds?
 
lbass, The sorting on the report is irrelevant. In the Chart Expert under Data you choose what "On Change of" event makes a new bar to stack. I've chosen based on File name and then month summing up how many times the item was downloaded over time. It works well except that items don't get added to the legend/sorting until it is seen in the list of data. So I have 2006-08, 2006-09, 2006-10, then 2006-07. Because there wasn't any data for most of the Files until 2006-08 it is null until it gets to a document with a 2006-07 and then decides to stick it on the end of the list. I have converted them to a Date Type to no avail it does the same thing.

I'm trying to come up with a way to "insert" a record into the list without screwing up the View in SQL. I know I can make a stored procedure to do it but I'd rather not.

I definetly think this is a bug wreiche and I was wondering if there was a way to submit bug reports to Crystal. I haven't found a way yet. I also know that Crystal's Graphing is intentionally limited. There is a 3rd party that adds a whole lot of graphing features called CRChart and I believe they make the graphing for BO. So Graphing will never be good in Crystal until they get out of that relationship and add real graphing into Crystal. It's pretty sad that the biggest player in Business Intelligence can't even do graphs as well as Excel.

Garrett
 
So here was my lame, yet effective answer to this problem.

I converted my datasource to a command object.
Unioned it with a query where I distinctly grouped my yr-month's and placed a value for the file name as first alphabetically. So no matter what it came first.

Example

filename | year-month | count
----------------------------------------
file1.pdf 10-2006 25
file2.pdf 08-2006 29
zfile1.pdf 07-2006 13

unioned with

filename | year-month | count
----------------------------------------
a.pdf 07-2006 0
a.pdf 08-2006 0
a.pdf 10-2006 0

select distinct 'a.pdf',year-month,0 from firstdataset group by year-month order by year-month

orginally a stacked bar graph done by the first part alone
would have 08-2006 first then 10-2006 then 07-2006

after adding the a.pdf legend etc. sorts properly

I was able to edit the label of the a.pdf and change
it to a space so it doesn't show on the report.

Hopefully BO will fix this bug.




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top