Negative zero using Crystal Report ToText()
        Posted  
        
            by Dan Ward
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Dan Ward
        
        
        
        Published on 2010-05-12T15:09:23Z
        Indexed on 
            2010/05/12
            15:14 UTC
        
        
        Read the original article
        Hit count: 321
        
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.
© Stack Overflow or respective owner