Options

Many SumindexFields >100

JedrzejTJedrzejT Member Posts: 267
I need to take totals on about 120 fields in one table for 2 reports.
They will be used these reports about 10,15 times a month
Once in a month they entered about 2000-3000 record in this table

I need sumindexfield on this key:

"Document No.,Employee No.,Organization unit,Cost account,Emp type,List type,Payout date,Document date"

All sift level maintain!

What i should do?

Create fields:
Employee No. 2,Employee No. 3,Employee No. 4,Employee No. 5
On insert Trigger put code:
Eployee 2,3,4,5 = Employee no.


Create keys.

Doc No.,Emp No.,Orgunit,Cost acc,Emp type,List type,Paydate,Doc date
Doc No.,Emp No 1.,Orgunit,Cost acc,Emp type,List type,Paydate,Doc date
Doc No.,Emp No 2.,Orgunit,Cost acc,Emp type,List type,Paydate,Doc date
Doc No.,Emp No 3.,Orgunit,Cost acc,Emp type,List type,Paydate,Doc date
Doc No.,Emp No 4.,Orgunit,Cost acc,Emp type,List type,Paydate,Doc date
Doc No.,Emp No.5,Orgunit,Cost acc,Emp type,List type,Paydate,Doc date

And for all create 20 sumindexfield = 120

OR


Simply Sum field along loop for this reports. ;)

Comments

  • Options
    JedrzejTJedrzejT Member Posts: 267
    Second example was easiest for develop.

    RecRef.OPEN(54019);
    FOR I:=1 TO RecRef.FIELDCOUNT DO BEGIN
    FldRef:=RecRef.FIELD(I);
    EVALUATE(FieldValue[1],FORMAT(FldRef.VALUE));
    END;

    So,I have made it in this way

    Regards.
  • Options
    DakkonDakkon Member Posts: 192
    A really great way to keep running tallies of non-sumindexed fields in a report is the CREATETOTALS() method. If you are using all these fields in some reports I would deffinately use this method since it will take care of the correct totals in footers/group footers etc.
    Thad Ryker
    I traded my sanity for a railgun :mrgreen:
Sign In or Register to comment.