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

Selection Formula Problem 1

Status
Not open for further replies.

Crystalyzer

Technical User
Mar 28, 2003
218
I have a simple selection formula as follows:
Code:
{Prospects.Owner}<>"Joe"

The problem is that when I use this selection formula any records that have a NULL value in owner are filtered out as well. Am I doing something wrong?

Thanks and best regards,
-Lloyd
 
Try using:

isnull({Prospects.Owner}) or
{Prospects.Owner} <> "Joe"

-LB
 
LB

I tried that, however there are other owners that get filtered out then. Effectively I want my report to contain all owners including records with no owner and exclude Joe.



Thanks and best regards,
-Lloyd
 
The formula should do exactly what you want. Maybe you should try it again. Can't see any reason why other owners would get excluded.

-LB
 
LB

When I did this initially I entered the formula as follows:
Code:
{Prospects.Owner} <> "Joe" or isnull({Prospects.Owner})

When I reversed the order (to what you suggested) I got the desired result.
Code:
isnull({Prospects.Owner}) or {Prospects.Owner} <> "Joe"

I am confused as to why this would be. Can you clarify?


Thanks and best regards,
-Lloyd
 
I've had some screwy instances where CR doesn't treat <> correctly for string fields. Try:

not({Prospects.Owner} = "Joe")
 
Whenever you test for nulls, you must do this first, i.e., isnull() must be the first clause in the formula. Otherwise, it doesn't capture the nulls.

-LB
 
Thanks again LB. Star for you!

Thanks and best regards,
-Lloyd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top