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

ppVariable carries the group totals.

edited April 2003 in General
I have a datafield in the datapipeline,
And have a groupfooter which has 4 ppVariables which should print the totals
of the above datafield,
The totals are gathered from 4 differant variables in code, i.e L1, L2, L3,
L4
Then in the OnCalc event of the ppVariables I assign L1, L2 .. etc to the
relevant ppVarriables value. Upto this it is ok.

My problem is in which datafield event should I accumulate totals into the
varriables L1...etc.

Thanks in Advance

Moorthy
~~~~~~

Comments

  • edited April 2003
    Moorthy,

    I am having a little trouble understanding what you mean by "which datafield
    event" you should use. If you are keeping track of the totals of certian
    variables, you should update the total value inside the Variable.OnCalc
    event just after you calculate the value of the variable. Something like
    this...

    procedure TForm.ppVariableCalc(Sender: TObject; Value: Variant);
    begin
    {Calculate the variable}
    Value := {some calculation};

    {update the total}
    varTotal.Value := varTotal.Value + Value;
    end;

    --
    Best Regards,

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