Crystal reports null field?

Thank you Sarah,
Works great.
Mark
-----Original Message-----
From: sarah.vareschi@... [mailto:sarah.vareschi@...]
Sent: Tuesday, February 25, 2003 12:20 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Crystal reports null field?


This should work.

I opened crystal and did the same as you and entered the following
equation:

if isnull({LaborDtl.LaborHrs})
then 0
else {LaborDtl.LaborHrs}

and, I get the correct results (a 0.00 if it's null and the value if it's
not.





[Non-text portions of this message have been removed]
Hello Group,
Here is today's puzzle.
I have a crystal report which uses the jobhead table to list all open jobs
by job number. I then have a left outer join to the LaborDtl table. My
report contains 2 fields, jobhead.jobnum and labordtl.laborhrs.
This shows me all jobs, some with labor and a few without. The labor field
appears blank when there is no labordtl record. I want to have a zero
appear.

I have tried this formula "IIF (isnull({LaborDtl.LaborHrs}),0
,{LaborDtl.LaborHrs} )" I get the false part(laborhrs) but for the true part
I still get a blank instead of (0.00).

If I use "IIF (isnull({LaborDtl.LaborHrs}),0 ,123 )" I get the true part
(0.00) and the false part(123).

I do not see anything like "unknown value" and I assume the problem is
that the labordtl record does not exist so testing for null is probably not
the correct way to go. Am I missing something obvious? Any one have any
ideas?

TIA
Mark Dupuis
This should work.

I opened crystal and did the same as you and entered the following equation:

if isnull({LaborDtl.LaborHrs})
then 0
else {LaborDtl.LaborHrs}

and, I get the correct results (a 0.00 if it's null and the value if it's
not.



[Non-text portions of this message have been removed]