cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble with Nulls

Former Member
0 Kudos

I have a program that I wrote a report to get called from, and I am having trouble with the Invoice.Project_ID being null. So I was trying to use this:

{Project.Project_Status} = {?Project_Status} and

{Project.Programmer} = {?Programmer} and

({Project.Project_ID} = {Invoice.Project_ID}) or

(isnull ({Project.Project_ID} = {Invoice.Project_ID}))

OR

{Project.Project_Status} = {?Project_Status} and

{Project.Programmer} = {?Programmer} and

({Project.Project_ID} = {Invoice.Project_ID}) or

(({Project.Project_ID} = {Invoice.Project_ID})isnull)

I'm fairly new so I'm not used to the syntax for nulls. I have checked the boxes that turn nulls into default values but that doesn't seem to make any difference.

Thanks in advance for you help

View Entire Topic
vitaly_izmaylov
Employee
Employee
0 Kudos

If I understood the logic, then you may try this:

{Project.Project_Status} = {?Project_Status} and

{Project.Programmer} = {?Programmer} and

(

IsNull ({Project.Project_ID}) or

IsNull ({Invoice.Project_ID}) or

{Project.Project_ID} = {Invoice.Project_ID}

)

The only rule I should mention here is that if there is a chance of Null value in the field then IsNull check should come first.

Above records selection formula will bring records where one of {Project.Project_ID} or {Invoice.Project_ID} is Null or if they are equal

Former Member
0 Kudos

Thanks I'll give that a try.