jessebrannen
asked on
Crystal cannot sum formula
IF {Z_MEV_MONTH.ComponentItem Number} = "120001" Then
((({Z_MEV_MONTH.NewProduct ion}* 0.47) - ({Z_MEV_MONTH.DeltINV}* -1)) * 0.26)
Else If {Z_MEV_MONTH.ComponentItem Number} = "81009" Then
((((({Z_MEV_MONTH.DeltINV} /({@Total ASA}*0.3) * 0.6411) * {Z_MEV_MONTH.NewProduction })*-1) - ({Z_MEV_MONTH.DeltINV}* -1)) * .311)
Else If {Z_MEV_MONTH.ComponentItem Number} = "81010" Then
((((({Z_MEV_MONTH.DeltINV} /({@Total ASA}*0.3) * 0.6411) * {Z_MEV_MONTH.NewProduction })*-1) - ({Z_MEV_MONTH.DeltINV}* -1)) * .311)
Will not sum
((({Z_MEV_MONTH.NewProduct
Else If {Z_MEV_MONTH.ComponentItem
((((({Z_MEV_MONTH.DeltINV}
Else If {Z_MEV_MONTH.ComponentItem
((((({Z_MEV_MONTH.DeltINV}
Will not sum
Make sure that the values in your maths are all numeric. Crystal may have trouble if any value it reads is null. Either goto the file menu and set all database nulls to default values, or catch these suckers and handle them.
I suspect the problem is this formula field
{@Total ASA}
Judging from the name it looks like this might be doing a calculation across multiple records.
If so then it probably can't be used in a formula which is summed.
You would have to use variables and build your own sum as you go.
{@Total ASA}
Judging from the name it looks like this might be doing a calculation across multiple records.
If so then it probably can't be used in a formula which is summed.
You would have to use variables and build your own sum as you go.
ASKER
having trouble with variables
Whileprintingrecords;
Global CurrencyVar Tot;
Tot = Tot + IF {Z_MEV_MONTH.ComponentItem Number} = "120001" Then
((({Z_MEV_MONTH.NewProduct ion}* 0.47) - ({Z_MEV_MONTH.DeltINV}* -1)) * 0.26)
Else If {Z_MEV_MONTH.ComponentItem Number} = "81009" Then
((((({Z_MEV_MONTH.DeltINV} /({@Total ASA}*0.3) * 0.6411) * {Z_MEV_MONTH.NewProduction })*-1) - ({Z_MEV_MONTH.DeltINV}* -1)) * .311)
Else If {Z_MEV_MONTH.ComponentItem Number} = "81010" Then
((((({Z_MEV_MONTH.DeltINV} /({@Total ASA}*0.3) * 0.6411) * {Z_MEV_MONTH.NewProduction })*-1) - ({Z_MEV_MONTH.DeltINV}* -1)) * .311)
just returns True or False???
Whileprintingrecords;
Global CurrencyVar Tot;
Tot = Tot + IF {Z_MEV_MONTH.ComponentItem
((({Z_MEV_MONTH.NewProduct
Else If {Z_MEV_MONTH.ComponentItem
((((({Z_MEV_MONTH.DeltINV}
Else If {Z_MEV_MONTH.ComponentItem
((((({Z_MEV_MONTH.DeltINV}
just returns True or False???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you!!!! Syntax, sytax, syntax.