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

isnull date statment in crystal 8.5

Status
Not open for further replies.

golfnut64

Technical User
Aug 17, 2005
3
US
I have a field that sometimes null and I want to use that field if it is not null but when it is null I want to use another field to get my "On Time" or "Late" statment, I keep getting an error "A Date Time is Required Here" and it places the cursor at the end of my first "esle". Can anyone help me with this stament please.


if isnull ({TBL_LTDELIVERYDETAIL.ACTUAL_DATE}) then ({TBL_LTDELIVERY.DUEDATE}) else


if{TBL_LTDELIVERYDETAIL.ACTUAL_DATE} = {TBL_LTDELIVERYDETAIL.APPOINTMENT_DATE} then "On Time" else
if {TBL_LTDELIVERYDETAIL.ACTUAL_DATE} <> {TBL_LTDELIVERYDETAIL.APPOINTMENT_DATE} then "Late
 
Try:

if isnull ({TBL_LTDELIVERYDETAIL.ACTUAL_DATE}) then totext(({TBL_LTDELIVERY.DUEDATE})) else
if{TBL_LTDELIVERYDETAIL.ACTUAL_DATE} = {TBL_LTDELIVERYDETAIL.APPOINTMENT_DATE} then "On Time" else
if {TBL_LTDELIVERYDETAIL.ACTUAL_DATE} <> {TBL_LTDELIVERYDETAIL.APPOINTMENT_DATE} then "Late"

A formula can't return 2 different data types.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top