开发者

Negative zero using Crystal Report ToText()

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,"00000000开发者_JAVA百科0000000000")

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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜