Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Cached Pages problem...

edited March 2002 in General
Hi all...

I create a report on screen (TppViewer) with "CachePages" enabled. I now go
and change the device to printer, reset the TppReport component, set
"CachePages" to false and do a "Print". The problem is, it still prints only
the cached records. Any new records that have been added after the initial
report creation on screen do not appear.

Any suggestions?

Kind regards, Marco Heine...
-----------------------------------------------------------
Marco Heine
QUMAS
Enterprise Compliance Management
Visit our Website: http://www.qumas.com

Comments

  • edited March 2002
    You'll have to reset the report. Calling Report.Reset should clear the cache
    of pages.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited March 2002
    Hi Jim...

    I think the problem is, that the query is not re-run. My TDataSet component
    stores its result in memory and does not reload it till the query is opened
    again or refreshed. Is anything called at the TDataSet when a new run report
    place?

    Regards, Marco...
    -----------------------------------------------------------
    Marco Heine
    QUMAS
    Enterprise Compliance Management
    Visit our Website: http://www.qumas.com


  • edited March 2002
    Are you just changing the SQL text on the query and not closing it? When
    you change the query, it should be closed before the report begins
    regenerating, so that the datapipeline will have to reopen the query. When
    the query is closed and reopened, I would expect that the dataset component
    would retrieve the latest records from the query and fill its local memory
    buffer with these new records.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited March 2002
    Hi Jim...

    When
    component

    That is what I would ask you, as I use DADE ;)

    Ok, here is what I do:

    Report.CachePages := true;
    Report.DeviceType := 'Screen';
    Report.PrintToDevices

    Then
    Report.DeviceType := 'Printer';
    Report.CachePages := false;
    Report.Reset;
    Report.Print;

    I put a few breakpoints in my TDataSet and the Report.Print does not invoke
    close, open or refresh.
    Any other ideas? :)

    Cheers, Marco...
    -----------------------------------------------------------
    Marco Heine
    QUMAS
    Enterprise Compliance Management
    Visit our Website: http://www.qumas.com
  • edited March 2002
    Hi Jim,


    when you assign SQL.Text, the query will be closed automatically, same for
    SQL.Clear.

    Cheers,
    Chris Ueberall;
  • edited March 2002
    Doh! My bad. I didn't look at the whole thing for a while and totally forgot
    that the one Report I'm looking at is the one exception from the rule and
    uses a completly different data source :P Fixed the problem and thanks for
    the support :)

    Cheers, Marco...
    -----------------------------------------------------------
    Marco Heine
    QUMAS
    Enterprise Compliance Management
    Visit our Website: http://www.qumas.com


This discussion has been closed.