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

page break and OnCalc event problem.

edited June 2003 in General
I am using RB6.03, D5, WinXP Pro.

I have a report with 3 groups all running off of one data pipeline.

If the third group prints it's header and then breaks at the end of a page,
the variables in the first detail record on the next page prints
incorrectly.

Group Header 2 prints.
Page Break
Group Header 2 reprints. (this is what we want)
Detail records prints.

however in the detail section, Variable2 prints the wrong value. It prints
the next record's values. It seems as if the record pointer increments
because of the page break. So what we see is something like:

Group Header --- Invoice 12034
Detail Part: 9988 (this is
incorrect is should say Part: ABC222')
Detail Part: 9988
Detail Part: 1245

The text 'Part: ' + PipeHead['partno'] is variable2's OnCalc function.

Thanks in advance for any help.

Andy

Comments

  • edited June 2003
    Additional info:

    If the formula is in the Variable's OnCalc event it does not work.
    If I move the Variable's formula to the Detail Before Print event it works
    fine.

    Again it only happens if a page break occurs just before the detail line
    prints.

    Thanks



  • edited June 2003
    Andy,

    The TppVariable.OnCalc event should fire on traversal each time. Try
    placing the TppVariable in the detail band only. The BeforePrint event
    fires very frequently and could give you wrong data if used for
    calculations. Try using a trial version of ReportBuilder 7.02 and testing
    with that. If this does not help, please send a small example demonstrating
    the problem to support@digital-metaphors.com and I'll take a look.

    --
    Best Regards,

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