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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum of sums?

Status
Not open for further replies.

TKUMI

Technical User
Apr 26, 2007
3
US
Can you create a sum of sums, or subtract one sum from another? I have two sum:
Sum of INVOICES.INV_AMOUNT and Sum of INVOICES.PAID_AMT
I just want the total balance, ie:
Sum of INVOICES.INV_AMOUNT - Sum of INVOICES.PAID_AMT
What is the formula for this? I've been trying different things but I keep getting just the text 'sum' and such.
 
you'rebetter servedtopost technicalinfo:

Crystal version
database
examples of formulas used and wherthey are in the report,rather than describing formulas...

Within the formula editor you can reference sums for building this, or you can manually do sums of them.

Here's an example:

Sum ({Orders_Detail.Unit Price}, {Orders_Detail.Product ID})-Minimum ({Orders_Detail.Unit Price}, {Orders_Detail.Product ID})

Thiwas builtinthe formulaeditorby selecting the sums fromth list.

-k
 
Which version of Crystal are you using?

In V9 once you create a sum on the report, it shows up in the field list within the Formula Workshop.

Have you tried:
Code:
Sum(INVOICES.INV_AMOUNT) - Sum(INVOICES.PAID_AMT)
?

Simon

"I do not have to forgive my enemies. I have had them all shot."
- Ramon Maria Narvaez
 
I am using CR XI.

I have entered:
sum ({Sum of INVOICES.INV_AMOUNT}) - ({Sum of INVOICES.PAID_AMT})

My result is:
sum (1,848.79) - (148.95)

I just can't get it to actually subtract. I've tried deleting the spaces around sum and -, but it just changes the 'text' output. I thought I was doing what is being suggested.
 
Hi,
Where are the 2 sums placed?
In that same location, place a formula that does the subtraction ( no need to SUM the math step,you are already working with SUMs)

@MySumDifference
Sum(INVOICES.INV_AMOUNT) - Sum(INVOICES.PAID_AMT)


[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top