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

Last AfterGroupBreak does not fire sometimes

edited February 2002 in General
Hi,

I've got two reports with groups in which the breakvalues are made by
OnGetBreakValue.
In each of these reports I've got an array that I need to fill a chart.
I use AfterGroupBreak to add a value to this array each time a new group was
printed.

Now the strange thing is that in one report the last groupvalue is not
added, in the other it is.
So if I have the groups with breakvalues 'A','B' and 'C', in
one report 'C' is added to the array, in the other 'C' is not.

All the groupheaders and footers are printed in both cases, it just seems
like this last AfterGroupBreak does not fire. BreakNo is also one less in
the case of the erroneous report.

Any ideas where I should look for the problem?

Thanks,

Silvia Janssen

Comments

  • edited February 2002
    You may want to try to use the GroupFooterBand.Before/AfterGenerate events
    instead of the Group.AfterBreak.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited February 2002
    I've tried that, but I've still got the same sort of problem, but maybe a
    bit more specific:
    In each GroupFooterBand.AfterPrint-event all the correct values are added to
    the array.
    When I read the array into the chart I use Group.BreakNo-1 as the last
    value-index of this array.
    This works fine in the one report, but in the other report the final BreakNo
    (of the last group printed)
    is 1 less than it should be.
    (This chart is printed in each group-footerband, so I cannot use
    array.Count-1, as this would only work
    in the final groupband)
    Somehow BreakNo is not incremented in the final groupbreak.

    Any ideas?

    Thanks,

    Silvia Janssen



  • edited February 2002
    For now, add an integer counter to the GroupFooterBand.AfterPrint event
    instead of using Group.BreakNo. Reset the counter variable back to zero in
    the Report.BeforePrint event.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.