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

Problem with linked chart to report header

Status
Not open for further replies.

DriesG

Programmer
Jul 2, 2003
16
0
0
BE
Hello,

I have a problem with a chart on a report.
The report is based on a query. In this query there is a field called "Product nr". This field is a group header in the report, so it groups data on each interval (every new product number).
Together with each group I would like a chart to display some data. This chart should group the data as well on each interval. The chart is related to the same query and it has as well the field "Product nr"
If you create the chart with the chart wizard, it is possible to link the field in the report with the field in the chart. After the wizard has finished, you can see the field names in the chart properties box: linked child fields and linked master fields.
This appears to be ok. The problem though is that when you preview the report, the chart does not reflect the correct data (although in the underlaying SQL query of the chart the data is correct). The chart changes on every interval, but not with the correct data of that specific interval. It mixes charts between intervals. For example chart 1 for interval 1 is mixed with chart 2 from interval 2.
If you create the link between the fields directly in the charts property box, you get the failure message that you can't build links between unbound forms (although it was possible through the wizard).
Even if you create a bound or unbound object and create a chart in that bound or unbound object it still is not possible to properly link the chart to the group header of the report.
How can I link the chart to the group header of the report so the chart shows the correct data for each group header interval?

thanks for any help.

regards,
Dries
 
You may need to requery the Chart Object in the On Format event of the section containing the chart/graph.

Dim obj as Object
set obj = Me.GraphCtrlName
obj.Requery
set obj = nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top