Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Need to identify old customers Post Reply Post New Topic
Author Message
stevbren
Newbie
Newbie
Avatar

Joined: 20 Nov 2007
Online Status: Offline
Posts: 33
Quote stevbren Replybullet Topic: Need to identify old customers
     Posted: 16 Mar 2009 at 6:46am
I may have posted this to the wrong forum before.
 
I have been asked to provide all clients who have not done work with us in at least two years.
I have customer ID number and job date entered field. Only two tables. Seems easy, but I am not getting results that are correct.
How should I set this up?
Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Mar 2009 at 7:24am

DO you have multiple records per customerid per job?

If so here is one way...
group on the customerID number
Create a formula field to "flag" customers called "DateFlag".:
if datediff("d",{table.jobdatefield},currentdate)<731 then 1 else 0
 
Sum this formula at the customer group level.
Now if the group sum=0 then no orders were done in the past 2 years, if it is >0 then at least 1 order was done.
You can use that criteria to suppress groups records you don't want to show.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum