Easy to Create, Easy to Change - Easy to use!


Sum of & Sum


Started by Paul Crowther
Search
You will need to Sign In to be able to add or comment on the forum!

Sum of & Sum

I am a 'Returnee' to Dataease.  I used to develop in DE 4.53 but have since lost most of my skills.  I am trying to re-learn and I am having a problem with a dbase I am developing.  The problem is this; I have 2 tables both related.  I want to develop a report that will:

Sum the values of a particular field in the home table and sum the value of a particular field in the related table and then create a calculated field to generate the difference between the two sums.

Any help would be appreciated.

Paul

Written by Paul Crowther 31/07/13 at 15:06:44 Dataease [{8}]FIVE

Re:Sum of

Forget about statistical fields and all that stuff.

The big secret in DE is using virtual fields that is part of the "table". These can be references like any other field/column.

the function to use is: sum of

sum of is a relational function like Lookup/Mean of etc and works on a relation and a field.

Derivation(Field: OrderTotal): sum of SubformRel Total where the key between the main form and the subform is ex. OrderNr (one to many) will the sumarize the sum of the order.

This is a field in the MainForm and you can reference it further: 

Derivation (Field VAT): OrderTotal*0.2


Written by DataEase Tech Sup 31/07/13 at 16:06:46 Dataease [{8}]FIVE