Solved

Crystal Reports Sum Unique Gifts

Posted on 2011-02-23
6
518 Views
Last Modified: 2012-05-11
I have been working on this report all week and am SO close to finishing but just cannot figure out what should be an easy issue.  I am trying to create a report that lists all "in honor of" recipients per gift, grouped by donor.  Since there can be more than one honoree per gift I have suppressed the duplicated fields based on the unique gift id.  I do not want to use sub-reports because that just locks up the report and takes FOREVER.  

Since I have suppressed records in the report, I am trying to summarize all gifts in each group based on the gift's unique id.  For example,

Name          Fund                    Amount          In Honor Of          Unique Gift ID
John Doe    Alumni                 $10,000          Jane Doe             123456
(suppressed)                                                Jimmy Doe
(suppressed)                                                Justin Doe

Does that make sense?  When I just use a straight total the un-supressed records are counted in the total.  I have created a formula to give me the correct total per record but if the donor gives more than one gift I cannot summarize the formula.

Here is my formla for the unique gift sum:

if {gifts_full.giftkey}<>previous({gifts_full.giftkey})
then {@Gift Amount}

Any help is always appreciated!

Lisa


0
Comment
Question by:lcallah93
  • 3
  • 3
6 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 34964277
Are you grouping records?

YOu probably need a group on the Gift Id
In the group header you can put the common information and use the details to list the honorees.

In the group header you can then use formulas to calculate the total.

In the report header add a formula
WhilePrintingRecords;
Global NumberVar TotalGifts;
""

In the group header
WhilePrintingRecords;
Global NumberVar TotalGifts;
TotalGifts := TotalGifts + {GiftField};
""

In the report footer to display the total
WhilePrintingRecords;
Global NumberVar TotalGifts;
TotalGifts

mlmcc
0
 

Author Comment

by:lcallah93
ID: 34964503
Yes, that is exactly what I want.  After I posted the question I went back to a previous post you sent me and used it as a template and arrived at the above output.

Thank you!

Now I want to suppress records based on the total but cannot - can you evaluate suppression formulas after the above formulas?
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 34965827
Suppress what?

mlmcc
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:lcallah93
ID: 34969384
Sorry - I have the records grouped by donor with the gift total in the group footer.  In the below example I would like to suppress all groups (John Doe) with Total Gifts less than $10,000.  However, since both grouping and summary functions are not done until the last pass I am at a loss as to how to accomplish this.  Is there a workaround or am I out of luck?

Name          Fund                    Amount          In Honor Of          Unique Gift ID

John Doe (group)
  (gift 1)       Alumni                 $5,000          Jane Doe             123456
                                                                 Jimmy Doe
                                                                 Justin Doe
                   
   (gift 2)       Building                 $3,000                                      555555
                     
                  Total Gift:       $8,000 (group footer)

I have attached the report for your convenience.


New-Major-Commitments.rpt
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 34971004
Can't do it using the existing totals.

The total isn't calculated until after the group header and detail are displayed so they can't be suppressed.

The only way I can think to do that is to add a subreport or a SQL expression to the group header that calculates the total and then suppress based on that.

mlmcc
0
 

Author Closing Comment

by:lcallah93
ID: 34971047
That is what I thought.  I will work on it.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
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 video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

912 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

16 Experts available now in Live!

Get 1:1 Help Now