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

Evaluating a record when the end date has not occured 1

Status
Not open for further replies.

crachic

Technical User
Dec 27, 2007
46
US
I have a scenario where I want to do an evaluation that is basically the following. This is not actual code.

If (?Date) in (Beginning Date) to (End Date)
Do evaluation
else if (?Date) ......

The ..... represents the part where there may be no end date. The end date has not occured yet. I want the formula to look to see if there it an begin date AND an end date, and if there is no end date evaluate just as long as the the (?Date) is greater then or equal to the Begin Date.

I tried using the >= Begin Date but of course that did not work properly because if the (?Date) was not in the Begin and End Date, it would still evaluate it if the (?Date) was after the Begin Date.

I hope this makes sense. If not please let me know which part does not make sense and I will try to explain it better.

I am using Crystal XI.

Any input would be greatly appreciated.

-crachic
 
Try:

if
(
isnull({table.enddate}) or
{table.enddate} = date(0,0,0) or
{table.enddate} >= {?Date}
) and
{table.begindate} <= {?Date} then //your evaluation

-LB
 
Thank you lbass...it worked perfectly...

-crachic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top