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!

Bar graph too crowded. What should i do?

Status
Not open for further replies.

SumSum

Programmer
Jan 15, 2001
3
CA
I made a bar graph from a recordset. The problem is that there are too many columns so the the graph becomes too crowded. I would like the split the graph into multiple bar graphs (without the need of creating multiple report).
Any idea how?
 
You could create 2 large primary groups in the report, and put the chart in that group header of this group. This would give you one chart for each group. Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
thank you for the response. i understand your idea but still don't know how to do it.

the x-axis of my graph is CustomerName, and the y-axis is the amount of money that they spent. Say I have 100 customers, how should i group them say 20 then 20 then 20...

thanks
 
You need a database field that will categorize them into 5 different groups.

Unfortunately, you won't be able to use the subtotal itself to organize them into groups. It will have to be something else, like State, Alpha ranges of name or ID, etc.

If {name} in "A" to "D" then 1 else
If {name} in "D" to "H" then 2 else
If {name} in "H" to "M" then 3 else
..


You could group on a formula like the one above and it would divide the population into several groups, each one could have its own graph.

Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
SumSum: The answer you are looking for lies within Crystal! All you need to do is to group your report by Customer Name and select Specified Order as the group type. This will enable you to set up as many sub-groups as you like with each sub-group having its own rules for membership e.g. you could have a sub-group (actually called a Named Group) called A-D where the rule is Customer Name startswith A or B or C or D and then another called E-H where Customer Name startswith E or F or G or H etc...

Your graph will then only have a bar for each named group i.e. one for A-D and one for E-H...

If you want to be able to drilldown and reveal the individual bars for A,B,C,D you will need to cheat a little, create a formula field (call it what you like) and have the formula simply the Customer Name field. Then use this formula field to insert a second group (this one will show names) and insert another chart at level 2. Now when you drill down on group A-D you'll see a bar chart for all the customers in that group - if this is still too many consider changing this level also to specified order but make the groups A and B and C etc. where the rule is formula field startswith A... and then have another field for level 3

Hope this helps David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
Thank you all for your answers.
you guys have really some great ideas, but it is not exactly what i am looking for.

i am looking for some kind of "Page Break" for the graph (using some trick or some built-in function in CR that i am not aware of). you see, the number and the name of Customer increased dynamically, so # of customers that start with "A" may itself become very huge.
 
SumSum: The ONLY way to get what I think you are looking for is to consider some 'grouping' of your Customers into a smaller number of datapoints. It is this which is generating all the bars. Either Ken's suggestion or mine about the use of specified order can be used to create these 'grouping' to be as tight (e.g. Customer Name between 'Aaa' to 'AaZ' etc.) or as loose (e.g. Customer Name between 'A' and 'L') as you like David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top