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

Problem with 2pass report

edited March 2004 in General
Hello,

I am not sure why this happens:

I have three pass thru functions, that create a status window, show some
progress messages and destroy the window. I call these functions in the
OnStartPage and OnEndPage-events. This works fine in one pass reports. When
I change the report to two pass, I can see the normal behaviour, then there
is flicker and the variables? values are all reset to zero. If I do not
destroy the window, the report generates ok.

Is it possible, that - as destroying the window returns focus to the
previewer -the variables are reset?

Thank you!
Bernd

Comments

  • edited March 2004
    Hi Bernd,

    For future reference, please post RAP questions in the RAP newsgroup so we
    can get your question answered quicker.

    As a test, try placing a showmessage call inside the events where the pass
    thru functions are called to see if they are being called more than once and
    this is perhaps altering the values. If so, you can use the
    Report.FirstPass and Report.SecondPass to check which pass you are on and
    limit the function call.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2004
    > For future reference, please post RAP questions in the RAP newsgroup so we
    Ok, sorry.

    and


    The calculations basically are of the form: Value:=Function(X);

    I experienced that, when switching from and back to the app or the preview
    window, the variables are recalculated as the screen is redrawn. Maybe the
    field values I feed into the functions are out of sync in this case.

    Any idea?

    Bernd
  • edited April 2004
    Hi Bernd,

    This is right... all your rap code will be executed when you switch to the
    preview. This is definitely a possibility if you are at runtime and
    switching from a running report to your app and back again. Somewhere in
    there your fields might be out of sync and you may be confusing the report
    engine. You may need to cache the correct settings when you move from your
    report to the app so you can return to the report with out incident.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.