Solved

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

Posted on 2013-11-13
4
417 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ODBC Question 3 49
Powershell script 13 115
Simple SQL query from two tables 13 58
.lee file containing data 5 42
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
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…

856 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