Problem with graphs

S

Sven Daems

Hi

I've a table with par example 3 fields: Shop, Number1, Number2. Like:

New York 12 8
Paris 69 15
Brussels 50 2

I want to sort a report with graphs for those shops. Page 1 contains a
graph with the 2 numbers from New York, page 2 the same graph for
Paris and the third page the same for Brussels. Just like a simple
report, but I don't want the numbers, I want it in a graph.

I know it seems simple but I don't find any solution. And off course,
it's just an example table. The one here is a lot bigger....

Thanxs
 
D

Duane Hookom

You can set the Link Master Child properties of the graph control like you
would for forms/subforms or reports/subreports. Your main report would need
to have a record source of each unique Shop.
 
S

Sven Daems

I've a report with record source to the table. The record
source of the graph is to a query with 4 fields: "Expr:
Null, Land, Numbre1, Numbre2" The Link Master Child
properties are both set to Land.

The thing is, sometimes it works. Sometimes it doesn't.
For example. When i open the report in previeuw, the first
graph is always good. But the second, sometimes it's good
but most of the time it remains the same value as the
first. When I move to the third it's sometimes good,
somtimes it won't change the value, the forth also...
 
R

Rick Brandt

Sven said:
I've a report with record source to the table. The record
source of the graph is to a query with 4 fields: "Expr:
Null, Land, Numbre1, Numbre2" The Link Master Child
properties are both set to Land.

The thing is, sometimes it works. Sometimes it doesn't.
For example. When i open the report in previeuw, the first
graph is always good. But the second, sometimes it's good
but most of the time it remains the same value as the
first. When I move to the third it's sometimes good,
somtimes it won't change the value, the forth also...

Getting charts in Access to change "per-record" is extremely unreliable (I
often have trouble getting them to update between report instances much less
records in a single instance).

The basic issue is that the report is processing faster than the chart is
and the report is not waiting for the chart to catch up. There is an
article on Microsoft's web site that describes some solutions to the problem
(don't have the link handy), but I had very spotty results using those
methods. They do "help", but IME do not eliminate the issue.
 
G

Guest

And with printing? It's not important that the values are correct on a
screen. The must be printed correctly
 
R

Rick Brandt

Sven said:
And with printing? It's not important that the values are correct on a
screen. The must be printed correctly

Previewing or printing makes no difference.
 
G

Guest

Thanks Duane, off course I can't be 100% sure it's working but I opened the
report serveral times and now the data is show'n good in the chart. Here the
code I used for the section who contains the chart...

Private Sub Détail_Print(Cancel As Integer, PrintCount As Integer)
On Error Resume Next
Dim objGraph As Object
Set objGraph = Me!Graphique0.Object
objGraph.Application.Update
objGraph.Refresh
DoEvents
Set objGraph = Nothing
End Sub

And please check out
http://ourworld.compuserve.com/homepages/attac-cg/acgsoft.htm, a good website
for 'stupid' access problems
 
G

Guest

From the website you mentioned this seems like it will assist me, BUT i have
three graphs on the page that are having this issue (graph236, Graph224,
Graph230) how would you write the code from below to handle the 3 graphs?

1) Problem: When the report is previewed or printed, Graph doesn't display
the proper data from its record source, instead it displays either the data
from a prior record or the sample data in the Graph data sheet:

On Error Resume Next
Dim objGraph As Object
Set objGraph = Me!TheNameOfYourGraph.Object
objGraph.Refresh
DoEvents
Set objGraph = Nothing

How do you update this code to handle three graphs?
 
D

Duane Hookom

Try something like:
On Error Resume Next
Dim objGraph As Object
Set objGraph = Me!graph236.Object
objGraph.Refresh
DoEvents
Set objGraph = Me!graph224.Object
objGraph.Refresh
DoEvents
Set objGraph = Me!graph230.Object
objGraph.Refresh
DoEvents
Set objGraph = Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top