views:

85

answers:

1

Using Crystal Reports 8.5 on Windows Vista or 7, I'm using the ToText function to report a value:

totext(Sum ({ap121w7.yrentamt}, {@type1099})*100,"000000000000000000")

The result (if yrentamt is 0) is -000000000000000000 The dash (I assume it's a negative sign) is unneccessary and unwanted in my report. Is this a bug, or is there an easy solution?

--Note--

I would very much like to avoid the following:

if {ap121w7.yrentamt}=0.00 then
    yrentamt := "000000000000"
else
    yrentamt := totext({ap121w7.yrentamt}*100,"000000000000");

I have about 100 files to fix with multiple formulas per file, and the above solution doesn't seem to work consistently either.

+1  A: 

Looks ok - try using the Round() function on your number before calling ToText() - maybe your 0 value is actually some very tiny negative decimal.

Ray