recordset (VBA) for graph ?

Z

Zlatko Matiæ

Hello.

I have a MS Access front end/PostgreSQL back-end combination.
There is a report with nested graph (linked master/child fields).
I used saved pass-through queries for both Record Source of the report and
Row Source of the nested graph. It works, but, when I have a lot of data,
the report has several hundreds pages and opening of the report is extremely
slow (cca 20 minutes). It's because for every page it must requery the Row
Source PST query (for the chart) again. I tried to put the select statement
in row source, so that JET queries for graph instead of PostgreSQL, but it
is even slower (cca 50 minutes)...
Now, I would like to avoid requerying for graph for each page. Could I use
the report recordset (that is only once queried) based on the Record Source
saved PST query and just filtrate that recordset and pass it to the graph as
the graph recordset (or Row Source) ? Some RecordsetClone ?
How to pass Recordset to MS Graph by using VBA ? IS there any sample code ?

Thanks in advance,

Zlatko
 
Z

Zlatko Matiæ

OK, I will answer to myself...
I solved this problem by a local table for graphs. I added code to On Open
event of report that retrieves data by executing PST query on Postgres and
then add such recordset to local JET table. Grapgh Row Source is local
table. Now it is about 20 times faster !

Bye.
 

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