简体   繁体   English

如何删除水晶报表中的小数位

[英]how to remove decimal place in crystal report

i want to return a text or a number based on a field value in crystal report 我想根据水晶报表中的字段值返回文本或数字

local numberVar i;
i:=Roundup(({@a}/{@b})*100,0);
if{@a}=0 then ToText('N/A') else ToText(i);

the result is always this in crystal report 结果总是在水晶报告中

  1. test_colum test_colum
    • N/A N / A
    • N/a N / A
    • 2.00 2.00
    • 3.00 3.00

since the integer value is converted to text using ToText() the integer results are appended with .00 由于使用ToText()将整数值转换为文本,因此整数结果将附加.00

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM