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

Null = 0.00

Status
Not open for further replies.

Yustrn

Instructor
Jun 19, 2002
42
US
I'm sure this is a stupid question so I aplogize in advance, but I need to know the if than for null

I am assuming it's If {whatever.rot} is null then "0.0000" else {whatever.rot}

If someone could please help I would highly appreciate it.

Thank You

This is using crystal 10
 
Try:

If isnull({whatever.rot}) then
"0.0000"
else
{whatever.rot}

this assumes that the field is a string sinbce you're intentionally wrapping the first 0 in quotes.

Also note that nulls need to be checked for first in formulas, as performed here.

If the field is a numeric use:

If isnull({whatever.rot}) then
0
else
{whatever.rot}

And then you can right click the field and select format field to set the number of decimal places.

-k
 
if isnull({table.field}) then
0 else
{table.field}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top