水晶报告负值和正值设计

时间:2016-05-05 12:29:33

标签: crystal-reports

我需要将负值显示为

(-)0.257

和正数作为

(+)0.367

我试图将公式创建为

if({CashSalesdtls.cround}<0) then
'(-)'+totext(abs({CashSalesdtls.cround}))
else
'(+)'+totext(abs({CashSalesdtls.cround}))

但是totext()将我的值四舍五入到小数点后两位,我需要三位小数。 请帮助我实现上述方案的任何其他选项。

1 个答案:

答案 0 :(得分:0)

您需要在ToText函数中提及小数位数。

if({CashSalesdtls.cround}<0) then
'(-)'+totext(abs({CashSalesdtls.cround}),3)
else
'(+)'+totext(abs({CashSalesdtls.cround}),3)

对于这些类型的案例,您需要先参考文档,这些文档将为您提供示例说明。链接如下

http://www.ibm.com/support/knowledgecenter/SS4JCV_7.5.5/com.businessobjects.integration.eclipse.designer.doc/html/topic629.html