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

Stopping a Report in Preview

edited June 2002 in General
Hi there,

I've build my own Preview-Form using TppViewer.
The Report-Settings are onePass and Cachepages.

Is it possible to stop the Report if I choose Lastpage and
if it is, will I loose the printed Pages for Preview or are they
accessable in my Prieview-Form???

regards
R.Dion

Comments

  • edited June 2002
    Since you have CachePages enabled, when you choose last page the in-between
    pages will be generated and stored as well. When you page back through the
    rest of the report the pages will be retrieved from cache. The pages
    themselves, should you need them, can be retrieved using
    Report.Publisher.Pages[Index].

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited June 2002
    Hi Alexander,

    in-between

    Thank's. It works. It's nearly what I need.

    Is it possible to do something like this:

    In Preview I call "Lastpage". The Report starts generating the Pages.
    The User presses a "Stop"-Button to stop the Report. Maybe there are 20
    Pages generated.
    These 20 Pages are stored in cache.
    How can I restart the Report at Page 21 without loosing the cached Pages???

    Any ideas???

    regards
    R.Dion
  • edited June 2002
    When the report asks for a page, the cache is first checked for the page
    and, if the page does not exist in the cache, only then is it regenerated.
    Therefore you should be able to simply keep going through the report if you
    havent cleared the cache. How are you implementing the stop logic? Make sure
    that you aren't doing anything that would clear the report cache in which
    case you would lose the generated pages.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited June 2002
    Hello Alexander,

    you
    sure

    I Call "Report.LastPage" and to stop the Report I call "Report.Stop".
    That works fine, but after calling "Report.Stop" I can't tell the Report to
    continue. The Report has maybe 20 Pages and I can navigate in this 20 Pages
    (Report.AbsolutePageCount).
    What I want is to continue generating the Report at Page 21 without loosing
    the previous generated Pages.

    How can I implement this?? I really need a solution!!

    regards
    R.Dion
  • edited June 2002
    You shold call Viewer.Cancel rather than Report.Stop. Then you can call
    Viewer.LastPage to keep generating the rest of the report.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited June 2002
    Hello Alexander,


    Thank you!
    It seems to work. I still have some Problems, but it looks good.
    Navigating through the cached pages is a problem. If I reach the
    last page and call Nextpage, the viewer jumps back to page 1
    instead of generating the next page.
    The second time I each the last page, the Report starts generating
    after calling Nextpage. Strange, isn't it???
    I'll spent some time on it, trying to locate the problem.

    regards
    R.Dion
This discussion has been closed.