4

我想根据水晶报表中的字段值返回文本或数字

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

结果在水晶报告中总是这样

  1. 测试列
    • 不适用
    • 不适用
    • 2.00
    • 3.00

由于使用 ToText() 将整数值转换为文本,因此整数结果会附加 .00

4

1 回答 1

7

ToText (x, y) 其中 y 是一个整数,表示将 x 中的值传送到的小数位数。

http://publib.boulder.ibm.com/infocenter/radhelp/v7r5/index.jsp?topic=%2Fcom.businessobjects.integration.eclipse.designer.doc%2Fhtml%2Ftopic629.html

于 2011-11-24T10:40:18.680 回答