Report Graph not responding to same recordset

J

jonefer

I have a report with a report graph whose recordset is the same query that
the report is based on.

I apply a "where condition" variable to the report when I open it and the
main report successfully receives the filter.

Why doesn't the report graph get the filter when it is opened?
 
R

Rick Brandt

jonefer said:
I have a report with a report graph whose recordset is the same query
that the report is based on.

I apply a "where condition" variable to the report when I open it and
the main report successfully receives the filter.

Why doesn't the report graph get the filter when it is opened?

Because the WHERE clause applied to the report has nothing to do with the chart.
 
J

jonefer

How then, can I synchronize the report graph's recordsource with the report's
recordsource?
 
P

Penguin

Try setting the RowSource on the reports OnOpen or insert this code in
the OnClick of a button on a form:

DoCmd.OpenReport "YourReportName", acViewDesign
Reports!YourReportName!YourGraph.RowSource = "QueryName" or "SQL"
DoCmd.Close acReport, "YourReportName", acSaveYes
DoCmd.OpenReport "YourReportName", acViewPreview

Hope this helps.
 

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