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!

Turn Zero's to Null

Status
Not open for further replies.

Yustrn

Instructor
Jun 19, 2002
42
US
Basic question, but I can't fiqure it out. Using Crystal 10 I need to turn zeros into blank fields.

So if 0 then " ", but I don't know what hte formula would be.

This is what I tried.

If ({ROTOptionExport.Shares 1}= 0 )then " " else ({ROTOptionExport.Shares 1})
 
Right click on the number field->format field->number->customize->check "suppress if zero".

-LB
 
That works great until I export this out of my main software, then the zero's re-appear.
 
Try a variant on your original idea,
Code:
If {ROTOptionExport.Shares 1}= 0 then " " else ToText({ROTOptionExport.Shares 1})
I assume your original formula was failing because you were mixing strings and numbers. You should have mentioned you needed to export the data, since suppress is fine for a report.

You should also have given your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options. And said what you are exporting to, sometimes there are useful extras. But the solution I've given should apply whatever you use.


[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top