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

Bar Chart with Too Many Bars 1

Status
Not open for further replies.

lynchg

Programmer
Nov 5, 2003
347
US
I have what should be a simple problem. I have stacked bar chart that shows cycle times for different tasks for people within a department. I have the user select the department as a parameter when opening the report. I use the department as the Group By field on the report and the chart is in that group header.

My only problem is that when there are many people in on department (> 15 people), the bar chart starts to become difficult to read. When there are 40 or more people in a department it looks ridiculous, you can't read any of the labeling because they are overwriting each other. I would like to be able to set a limit on the number of bars per page, it would be fine to have the data for one department span two or more pages.

I can't find any chart settings that would allow me to for it to continue the same chart on another page. I thought that this thread (thread149-1189385), would help but it looks like he is using 2 levels of grouping, and there isn't much of an explanation, I don't know if I could do something similar.

I am using Crystal 11 developer edition client installation on my PC, with Crystal Server 11 installed on the server, SQL Server 8 database, and we are running XP Pro.

Thanks.
 
My best advice would be to limit the chart to the "Top 10" or "Top 15" and group all other results under a heading of "Others"

You can access this functionality in the Chart Wizard under the Data tab of the Chart Wizard. You must choose the "Advanced" Chart Layout - and then under the "On teh Change of" box along the right hand side - you will see a button called "Top N" - this is where you set the chart to the top 10 or 15.

I hope this helps

Cheers
paulmarr
 
I tried the suggestion in the thread from lbass. It is definitely pointing me in the right direction, but my output is still kind of strange. I was already grouping on one field, so I created a formula field as lbass suggested, and added a second group on that formula field. I placed my chart in the group header section of the formula field group. Here is the code I entered into the formula:

WhileReadingRecords;
numbervar cnt := cnt + 1;
if cnt in 1 to 15 then 1 else
if cnt in 16 to 30 then 2 else
if cnt in 31 to 45 then 3 else
if cnt in 46 to 60 then 4 else
if cnt in 61 to 75 then 5 else 6

I have a case where previously I had 46 bars displayed on one chart on one page, now I have 6 pages with 3, 3, 5, 3, 4, and 39 bars showing up on the graphs on each respective page.

I'm not sure what is going on.
 
I figured out what was happening with my graph. My graph is a stacked bar graph, usually with 3 - 5 elements stacked on each bar. So when I set up my formula to push to the next page at every 15th pass in the detail section, it was functioning properly. So even though I only had 3, 4, or 5 bars per page there was always a total of 15 of the "sub-stack" elements per page.

I just changed my formula to:

WhileReadingRecords;
numbervar cnt := cnt + 1;
if cnt in 1 to 50 then 1 else
if cnt in 51 to 100 then 2 else
if cnt in 101 to 150 then 3 else, etc....

It doesn't give me a consistent number of bars per page but it always falls within 10 -15 bars, which is acceptable.

Thanks to everyone for your input.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top