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

Group on calculated value

edited February 2003 in General
Hi,

I want to define a group based on a calculated value.

I did the following

Define a group with breakType = btCustomField and
BreakName = periodBreak which is the name of a TppVariable of DataType =
dtString.

Then on the "oncalc" event of the variable, I set its value to something
representing the group identifier.

I put the variable in the detail band and I can see the good values
appearing but the group break does not happen. All the records are listed in
the same group even though the BreakValue changes.


What's wrong with my approach ?

Tks for help

J-M. Galliot

Comments

  • edited February 2003
    Use the OnGetText event. This is the only time we ever say to use any event
    other than OnCalc with a variable:) The reason is that referencing the Text
    property triggers the OnGetText event. This is fired when the group asks for
    the group break value from the variable. This also happens before the report
    engine tells the OnCalcs to fire, because the engine has to know if it is
    going to start a new group or not.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.