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

Variable Reset Timing

edited February 2006 in RAP
RB 7.04 / RBserver using a TrsClientReport

I have a variable set to calculate on traversal and reset on group end. It
works as expected except when the group goes beyond one page. The variable
is being reset after each page break and on group end.

Is this a known issue in RB7 fixed in RB9 by chance?

TIA - Jon

Comments

  • edited February 2006

    It is hard to diagnose the issue from the description alone. Is this a
    simple report, or a report that includes subreports? Is the variable in the
    main report or a subreport?


    If possible, please create a simple example using the DBDemos data and email
    to support@digital-metaphors.com in zip format. We can test here using the
    latest release.





    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited February 2006
    Very simple report, no subreports. Set to single pass no cache, single data
    table

    3 groups defined, several variables in each group.

    All variables are set to calc on traversal and reset on group end.

    In the oncalc I accumulate some values into global variables and in the
    onprint for the variable I set the value to the rounded accumulated value.

    (This report has to do rounding a non-standard way so I can't use the
    standard RB sum function)





  • edited February 2006

    The global variable is likely the cause of the problem. Accumlations need to
    done by TppVariabl components.

    The TppVariable components have the ability to save/restore intermediate
    results between pages. A global variable does not have this capability.



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited February 2006
    I'have tried using Tppvars for each group with the same results. I'm
    resetting the global variables for each group in the onreset for each group
    variable along with the value of that variable. If I take out the onreset I
    get the total expected for the whole report but the group totals are to high
    of course.

    The on reset event doesn't fire if it's all on one page but it fires after
    each page if a group croses the page boundry.


  • edited February 2006

    For simplicity I recommend that you test this report in a non-server
    environment (that should provide the same calc resutls).

    I checked back at bug fixes and there is a fix to TppVariable that was made
    for RB 9.03 and is included in RB 10. One option is to download the latest
    release (RB 10) and perform some tests.

    Another option is to try creating an example using the DBDemos that
    demonstrates this same behavior. Then email to support@digital-metaphors.com
    in zip format and we can check it out

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.