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

keep together and variables

edited January 2005 in RAP
Hi,

I've a complex report with several sub reports. I want to summarize totals.
So on every detailband record I increase the value of a variable (at the
OnPrint events of a dbtext). At the end of a report I show totals and that
works fine so far.

Now, when I set the KeepTogether option of a subreport (or I set the
Keeptogether option in Groups), the OnPrint event sometimes is called TWICE
on every pagebreak. So some values are double calculated in my total.

There is no way to work around this and this cost me two days to find out.

Is this a bug or what is the problem? How do I stop this double firing of
the OnPrint event?

I use RB 7.0.3 and D6.

TIA,

Rob

P.S. I tried everything and als the OnCalc events of variable are fired
twice. I saw a message that that is the only event which is never fired
twice, but thats not true.

Comments

  • edited January 2005
    Hi Rob,

    This is not a bug. The only event that is guaranteed to fire once per
    traversal is the OnCalc event of the TppVariable component. This is why you
    should only use the OnCalc event when making any calculations inside your
    report. I would suggest placing an invisible TppVariable inside your detail
    band and increasing the value of the other variable in it's OnCalc event.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

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