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!

need help in bar chart

Status
Not open for further replies.

yehong

Programmer
Sep 22, 2003
291
US
I need to show 10 groups on X-axis. If there is no data for any group then that group must appear on the report.
Currently I ve set up groups in by going in chart properties, and specifying them in In Specified Order.
Report still shows only three groups whose values exist, and remaining 7 groups don't appear on the report.
Is there anyway to force the chart to show all groups regardless of their value?

Thanks,
 
Use an Outer Join (or a UNION SQL statement) to ensure all groups are in the data set.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
hi. thanks for your response. The data is coming off a single table. I am creating 10 groups based upon a field value. Say if table.field's value is between 1-10 then group1,if table.field's value is between 10-20 then group2, similarly I am creating 10 groups. Now say if table.field' value is not between 10-20, then group2 does not appear on the chart. What I want is group2 should appear but with 0 values.



y-axis|
|
| 10 0 0 0
_______group1 group2 group3.....group10
(x-axis)

So this is how I want my graph to look.
 
Use a UNION query to force at least 1 record within each range to exist in the result set.

Alternatively, create a table to hold 10 records (one for each range and outer join it to the original table.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
I tried that but whenever there are no matching rows in the main table for the new table, then all the columns in the new table get set to null. So, no grouping is occuring. Could you explain it more in detail please. Also, how can I force from through a UNION query to make appear atleast one record?
thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top