Recordset for MS Graph (Chart) through VBA ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Zlatko Matiæ

    #1

    Recordset for MS Graph (Chart) through VBA ?

    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



  • Zlatko Matiæ

    #2
    Re: Recordset for MS Graph (Chart) through VBA ?

    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.

    "Zlatko Matiæ" <zlatko.matic1@ sb.t-com.hr> je napisao u poruci interesnoj
    grupi:dbgd8g$fj 7$1@ss405.t-com.hr...[color=blue]
    > 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
    >
    >
    >[/color]


    Comment

    Working...