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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display customers who have not ordered in 60 days

Status
Not open for further replies.

magicrjm

IS-IT--Management
May 13, 2005
93
US
In our order table, a date field is populated each time a customer service rep enters an order. I'm trying to create a formula on my Crystal Report that will only display customers that have not ordered in the past 60 days. I'm using Crystal 11.

I was entering a formula on our order date field in the database. I thought I had it when I used {oeordhdr_sql.ord_dt} < CurrentDate - 60, BUT this formula is not verifying if there are order > than 60 days. It seems that I would need to have an if then statement. Am I right? Can someone help or point me in the right direction?
 
Insert a group on customer and then go to report->selection formula->GROUP and enter:

maximum({oeordhdr_sql.ord_dt},{table.customer}) < currentdate-60

-LB
 
This should work..

Not (currentDate>DateAdd('m',-2,{oeordhdr_sql.ord_dt}))
 
I used formula suggested by lbass. Thanks, looks to be working great!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top