Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Total number of new records opened last 7 days

Status
Not open for further replies.

RCCRookie

Technical User
Jul 3, 2007
29
0
0
US
Crystal Developer 11.0.0.1282
SQL Server 2000
MS Windows XP Professional-
version 2002 Service Pack 2

I have been asked to add the ability to track the "Total number of new records opened in the last 7 days" and "Total number of records closed in the last 7 days" to a report.
The reporet is grouped on 1 - Customer Name, 2 - Customer SYSID, 3 - Related Nonconformance SYSID. The new and closed records I refer to would be customer communications from which group 1 and 2 come from.
There is a parameter in the report where the user can select a range for the communication date. However the intent of the tracking would be to track the new and closed records from the date the report is run, then back 7 days.

Am I making sense or do I need to provide additional information?
 
Depends upon what you mean by "new record." Does this refer to new customers? And by new, do you mean the very first time they have conducted business with you? Or only new in relation to the selected time period? For example, would you consider someone new in the last 7 days if it is the first business during the selected time period even though they might have been a customer prior to that?

Also not sure about how the other two groups relate to "newness".

-LB
 
New in relation to the time period (last 7 days). Doesn't matter if the customer is a previous customer or not. The first 2 groups specified are fields from the customer communication table. The 3rd group is from a Nonconformance table (possibly) resulting from a customer communication. Essentially I would be going by the communication date even the create date I suppose to determine whether or not it originated within the past 7 days. Does that clarify enough so that you can provide assistance?
 
No. What does that mean--new in relation to the last 7 days? And new what?

-LB
 
If you just want totals, you could create a running total that uses a formula.

You'd find 'in the last seven days' using something like
Code:
{your.date} >= (currentdate-7)
Maybe best to first put the various tests next to the data, to check that they produce the result you want. Put as I show them, they would be boolians, showing True or False (or blank if you hit a null).

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
New customer communications or closed customer communications within the past seven days when the report is run on any given day. If I ran it today I would want to see all closed and opened communication records within the past 7 days to include the date the report is run. If I run it a month from today I would want to see the date run and the corresponding past 7 days.

I was going through old posts trying to find something to help me. I came across a formula similar to this one which I'm presently using:
If {CUSTOMER_COMM_MNT_V.CLOSED_DATE} in Last7Days Then

1

Else

0

and

If {CUSTOMER_COMM_MNT_V.COMM_DATE} in Last7Days Then

1

Else

0

I put the formulas in the detail section and have running total on each. I'm not sure if this is the best method but I think it's all I've come up with thus far.
 
Instead of running totals you can just right click on each formula and insert a sum (not a count) at the group and/or report levels. I don't see what makes these records new though, unless you just mean recent.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top