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

Null Field in a formula

Status
Not open for further replies.

cgtrucking

Technical User
May 22, 2008
8
US
I am trying to use the if then else formula for selecting my data.

if{ci02.CI02_UDATE}=""then{ci02.CI02_UNIT}else"avail:"

I am trying to select the record if the unassigned date is blank. If it is blank then select the unit # data.

I get the error message "a date-time is required here"

Any suggestions would be greatly appreciated.
Thanks
Fran
 
Where is this failing? What is the data type of {ci02.CI02_UNIT}? It could fail here as well.

if isnull({ci02.CI02_UDATE}) then {ci02.CI02_UNIT} else "avail:"

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
I am using Crystal Reports 10.0.
{ci02.CI02_UNIT} is a string

It is failing after the = sign. It is looking for a date-time value here.
 
But udate is a datetime, so try dgillz' suggestion. Only the potential results of a formula have to be of the same datatype.

-LB
 
It took the formula that dgillz suggested. The report is still pulling all the data. I wanted it to pull out only the transactions which have an unassigned date equal to blank.

Thanks for any suggestions
Fran
 
Then you need to use a record selection formula like this:

isnull({ci02.CI02_UDATE})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top