Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum function.

Status
Not open for further replies.

ashishjain

Programmer
Feb 20, 2002
32
IN
I am making a report in which i have to find sum based on items and as well as summary sum also. when i finding sum of group item i have to put some condtion but i am not able to do that. I need Report data like this:

Item Transaction Report

Item1 Arrival 50
Item1 Arrival 20
Item1 Issue 30

Item1 sum 40

Item2 Arrival 40
Item2 Arrival 20
Item2 Issue 30

Item2 sum 30

Total 70

Here i am using sum({item.Qty},{item.item_cd}) to find group sum and for Toal i am using sum({item.qty}) for Total
but its not giving correct output what i want.

 
How is Item1 sum=40 when no combination or single value is 40? Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Thanx dgillz,
Here i have used one field 'Arrival/Issue'. Arrival data is added and Issues data is always subtracted from Group total.

So Item1 Gorup sum is calucalated like this way.
for item1:
50 + 30 - 40 = 40
for item2 40+20 - 30 = 30
 
You need a formual field @qty:

If {fieldname}="Arrival" then {qty} else
if {fieldname}="Issue" then {qty}*-1

Then sum this formula. Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top