Variable Reset Timing
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
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
This discussion has been closed.
Comments
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
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)
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
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.
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