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

converting nulls to zero

Status
Not open for further replies.

uksub

Programmer
Joined
Jun 15, 2003
Messages
51
Location
US
can someone walk me through the process of converting nulls to zeroes on my reports.
 
hi

create formula

@Conversion

if
isnull({your_filed}) then 0
else
{your_field}

cheers

pgtek

 
Well i eventually used the Reports Option "Convert Null fields to Default"... but for some reason I had to disable the "Use Index or Sever for speed" option. When this option was enabled, the "Convert Null ..." option was disabled. Do you know why that is?
 
hi
what version are u using of crystal?

pgtek
 
I'm using version 8.5
 
hi

lets start all over
do not use your
Reports Option "Convert Null fields to Default"...
leave that alone

is your field a string or numeric?

pgtek
 
it's numeric...

:-D
 
Ok
create formula

@Conversion

if
isnull({your_field})Or {your_field} = 0
then 0
else
{your_field}


 
if
this does not work
try this one
if
isnull({your_field})Or {your_field} = -1
then 0
else
{your_field}


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top