产品版本: | NC5.6 |
问题属性: | A应用操作 |
问题描述: | 在做查询引擎报表的打印模板出的问题: 在打印模板我使用自定义变量round(_subtotal_(字段1 ) / int(字段2 ), 2)显示结果为空但是我分开使用round(_subtotal_(字段1 ) / 10, 2)round( 1000 / int(字段2 ), 2)都能够正常显示,但合在一起就不行。 |
问题原因: | 查询引擎 打印模板 |
问题解决方式: | 试试以下方式1. round(tonumber(_subtotal_(字段1 )) / tonumber(字段2 ), 2) 2. temp1->tonumber(_subtotal_(字段1)); temp2->tonumber(字段2); round(temp1/temp2, 2); 3. 在自定义变量中定义 temp1,temp2.分别设置公式 tonumber(_subtotal_(字段1 )) ,tonumber(字段2 )。 然后在做一个自定义变量 设置公式 round(temp1/temp2 , 2).或者 round(tonumber(temp1)/tonumber(temp2) , 2) 因为有除法计算,你的确保你的“字段2”中的数据不能为0.否则会有除零异常。 |
大模块: | D人力资源 |
小模块: | HR报表 |