?
Solved

SUM positive and negative amounts

Posted on 2009-06-30
6
Medium Priority
?
1,248 Views
Last Modified: 2012-05-07
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

Open in new window

0
Comment
Question by:EMSI-Inf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 101

Expert Comment

by:mlmcc
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

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

SPykair
0
 

Author Comment

by:EMSI-Inf
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:EMSI-Inf
ID: 24757955
Hi - can anyone help me with the issue described above?
0
 
LVL 101

Accepted Solution

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

You can do it with formulas and variables.

mlmcc
0
 

Author Closing Comment

by:EMSI-Inf
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question