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

Trying to create a parameter and query where a field is empty or null 1

Status
Not open for further replies.

piovesan

Technical User
Jan 23, 2002
159
0
0
CA
Hi;
I have created a report where I want to create a parameter that allows the user to select all records where a field is either not null... or null... I THINK I need to determine if the field is "empty".... so I am trying to create a selection using a parameter called Occ Class Entered? like this....

({?OCC CLASS ENTERED?} = "NULL" and
Iif (IsEmpty ({FIRE_GRD.GRP_DIV}) ,0, {FIRE_GRD.GRP_DIV})
) or
(
{?OCC CLASS ENTERED?} = "NOT NULL" and
{FIRE_GRD.GRP_DIV} in ["C", "B2", "A2"])

But I keep getting an error that a ")" is missing.... I cannot figure out where, or if this is just wrong....
Thanks!
 

if {?OCC CLASS ENTEREED} = "Null" then
isnull({FIRE_GRD.GRP_DIV})

else

{FIRE_GRD.GRP_DIV} in ["C", "B2", "A2"]

should do it. Are C, B2, and A2 the only possible values? If so, you could simplify a bit:

if {?OCC CLASS ENTEREED} = "Null" then
isnull({FIRE_GRD.GRP_DIV})

else

not (isnull({FIRE_GRD.GRP_DIV}))





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top