Solved

# SUM positive and negative amounts

Posted on 2009-06-30
1,158 Views
I am in the process of creating an invoice that  gives a balance due - however all credits and charges must be summed together to give a balance due.
The issue I am running into is that for some reason the result  i am getting does not equal what  I am expecting.

``````sum ({bilingitem.amountdue}) where billing.item is a combination of records with values such as \$200, \$47.30, -\$238
``````
0
Question by:EMSI-Inf
• 3
• 2

LVL 100

Expert Comment

ID: 24751656
DO you have all the values in the one field?  Are there both positive and negative values?

mlmcc
0

LVL 10

Expert Comment

ID: 24752190
What type is the field that you're trying to sum ?

SPykair
0

Author Comment

ID: 24754335
MLMCC: I have the following scenraio on my invoice:

Code 7  -   Units 20 - Amount_Due - \$140
Code 10 - Units 5 - Amount_Due - \$100
Code 998 - Units 4 - Amount_Due (\$80) * this is a credit amount
Total Due on Invoice - \$160 (this would be a sum of Code 7 + Code 10 + Code 998)
In my Crystal report _ have a statement that says SUM({Amount_Due})

SPykair - I am trying to SUM (Money type fields) should I convert these to integers?

0

Author Comment

ID: 24757955
Hi - can anyone help me with the issue described above?
0

LVL 100

Accepted Solution

mlmcc earned 500 total points
ID: 24759749
Is the Sum({MoneyField},{AccountId}) not working?

You can do it with formulas and variables.

mlmcc
0

Author Closing Comment

ID: 31598639
Thanks - that helped - had to pull up other Crystal Reports doing something similiar and seems I am ok now - you guys are great out here. Please keep up the good work
0

## Featured Post

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.