on 12-01-2009 5:27 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
10 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.