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

Empty field.

Status
Not open for further replies.

gazol

Technical User
Jan 29, 2004
31
SE
I have problems with a formula that checks if a table field in the database are empty.

I must find a way to recognize if the field is empty or contains numbers. I must recognize some of the numbers and not choose them and also if the field is empty !

My field looks like:
--------------------------------------------
TYPE ID
---- --
DONE 55
DONE 12
DONE 1
DONE 0
DONE
DONE 4
DONE
DONE 12
---------------------------------------------

And my formula:

---@formula-------

if {TEST.TYPE} = "DONE" and {TEST.ID} <> [56,55,58,59,72] then datediff('s',{@test_start_time},{@test_stop_time})
else if {TEST.TYPE} = "DONE" and {CC_CLIENTS.ID} ISNULL then datediff('s',{@test_start_time},{@test_stop_time})
else 0

------------------

* How do i get the formula to recognise the empty fields ?
* Why can´t i use the isnull ?

The field only contains numbers and is numeric.
I´m using Crystal reports 8.5
The database is Oracle 8

I hope someone have a solution and can help me ! :)

Regards / Gazol
 
You need to change your IsNull construct like this:

IsNull({CC_CLIENTS.ID})

-dave
 
Adding to that, you should test for isnull first in your if statement. Anytime you touch a field that could be null with a comparison, that record will be filtered out of the dataset and mysteriously disappear...

Also, if this is a field you might use to link you will have to make it left-outer-join for it to show as well.

Scotto the Unwise
 
If you still have trouble after moving isnull to the starts, do a test display of all of the fields. Maybe {CC_CLIENTS.ID} isn't the only value that can be null.

You should also test it for being spaces.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top