Solved

Crystal Reports - Finding date where a Certain Giving Level has been reached

Posted on 2013-11-13
4
402 Views
Last Modified: 2013-11-14
Hi There

I am trying to get the date that a donor has reached a certain level and am not really sure how to approach it.

Here is what I have:

Date             Amount      Total Giving      
01/26/2006     $200.00      $200.00
03/01/2007     $100.00      $300.00
07/14/2008     $200.00      $500.00
09/24/2009     $200.00      $700.00
10/29/2009     $200.00      $900.00
10/06/2011     $200.00      $1,100.00
12/04/2012     $500.00      $1,600.00
10/17/2013     $500.00      $2,100.00

The Total Giving column is a running total formula, while the Date and Amount columns come directly from the data.

What I need to do is report on the date where giving has reached the $1,000+ threshold.

How can I get the 10/06/2011 date to appear in the report footer?

This seems like a fairly simple issue, but I just can't wrap my head around how to get this information out....

Any help would be greatly appreciated.

Thanks!
HMK
0
Comment
Question by:rporter45
  • 2
  • 2
4 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 39646403
Try this idea

In the report header add a formula

WhilePrintingRecords;
Global DateVar dtReachedLevel;
dtReachedLevel := Date(1900,1,1);
""

Open in new window


In the detail section add a formula
WhilePrintingRecords;
Global DateVar dtReachedLevel;
If {#RunningTotal} >= 1000 and dtReachedLevel = Date(1900,1,1) then
    dtReachedLevel = {YourDateField};
""

Open in new window


In the report footer add a formula
WhilePrintingRecords;
Global DateVar dtReachedLevel;
If {#RunningTotal} >= 1000  then
     dtReachedLevel;

Open in new window


mlmcc
0
 

Author Comment

by:rporter45
ID: 39648118
Hi mlmcc

I have tried this and am getting the result of "01/01/1900" for all records.  Each field in the detail is showing as empty...

I updated the formulas as follows:

Details formula became:

WhilePrintingRecords;
Global DateVar dtReachedLevel;
If {#Total Giving} >= 1000 and dtReachedLevel = Date(1900,1,1) then
    dtReachedLevel = {CnGf_1.CnGf_1_Date};
"" 

Report Footer formula became:

WhilePrintingRecords;
Global DateVar dtReachedLevel;
If {#Total Giving} >= 1000  then
     dtReachedLevel;

Thanks!
HMK
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 39648324
Sorry the assignment should use := not =

WhilePrintingRecords;
Global DateVar dtReachedLevel;
If {#Total Giving} >= 1000 and dtReachedLevel = Date(1900,1,1) then
    dtReachedLevel := {CnGf_1.CnGf_1_Date};
"" 

mlmcc
0
 

Author Closing Comment

by:rporter45
ID: 39648403
Thank you very much mlmcc!!

This worked like a charm :)

HMK
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

Title # Comments Views Activity
Client backup and data retention? 3 54
Optimize/Performance Tune Production Databases 11 58
t-sql sp_addlinkedserver possible risks 3 50
constraint check 2 0
SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Creating and Managing Databases with phpMyAdmin in cPanel.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

911 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

22 Experts available now in Live!

Get 1:1 Help Now