Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need Help with Sum(fld, condFld, cond)

Posted on 2004-08-18
5
Medium Priority
?
3,462 Views
Last Modified: 2012-05-05
Hi,

I'm pretty new with CR8.5 put I still know a little bit how to use it...

I have a list of Donors and a list of Pledges.

1 Donor can have many pledges.

Here's how my DB looks like :

DONOR       TYPE          CODE         AMOUNT
Donor1       Pledge        Verbal         1000
Donor1       Pledge        PG               5000
Donor1       Pledge        Verbal         2000
Donor1       Pledge                          4000
Donor2       Pledge        Verbal         3000
Donor3       Pledge                          1000
Donor3       Pledge                          2000
...

I would like to have a formula that would add the amounts depending of the Code for each donors.

My understanding is that : SUM({Gift.GiftAmount},{Gift.Code}."Verbal") should work but it doesn't.....

I'm trying to do a formula that would SUM the amount of all the pledges with the same codes for each donors....
Regular Pledges have no codes.

So my result should look like :


Donor1      TotalVerbal        TotalPG       TotalRegular
Donor2      TotalVerbal        TotalPG       TotalRegular
Donor3      TotalVerbal        TotalPG       TotalRegular

Can anybody help me ???
0
Comment
Question by:LosJee
[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
5 Comments
 
LVL 10

Accepted Solution

by:
ebolek earned 1200 total points
ID: 11831208
ok you use grouping for these

insert 2 groups : First is donor, second is code

Then put running totals on the amounts for the both group footers
On chnage of for donor group is donor
summary
reset at the chnage of group

Also put another running  total on the code group footer as well. Same logic. you will egt the totals for each donor and each code

0
 
LVL 42

Assisted Solution

by:frodoman
frodoman earned 200 total points
ID: 11831230
I agree with Emre.  Create your two groups as he says.  I would create the running totals and drag them into the Group #1 header and then suppress everything related to group #2 -- this will give you the display you want (single row for each donor).

frodoman
0
 
LVL 28

Assisted Solution

by:bdreed35
bdreed35 earned 600 total points
ID: 11832860
You can only use that version of the sum function when you are grouping on a date or a boolean field.

Another option that I tend to use more often than Running Totals is a simple formula to evaluate for each record:

If {Gift.Code} = "Verbal" then
    {Gift.GiftAmount}
Else
    0

You can then insert a summary off of this formula for your Donor grouping.  I like this method because I can easily put a grand total in without having to create formula.  WIth Running Totals you would need to create a seperate Running Total for each subtotal and grand total.
0
 

Author Comment

by:LosJee
ID: 11834652
Thank you all !

My problem was a way more complicated than explained but with your help, I was able to do this with groups but also, with some formula fields...

Thanks again !

U guys are the best !!!!!
0
 
LVL 10

Expert Comment

by:ebolek
ID: 11834659
Glad to help
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

715 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