Solved

Need Help with Sum(fld, condFld, cond)

Posted on 2004-08-18
5
3,440 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
5 Comments
 
LVL 10

Accepted Solution

by:
ebolek earned 300 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 50 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 150 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now