PB 计算公式算出结果赋值给另外一列

在数据窗口中添加一个公式列

--在itmchanged事件中写的计算赋值代码

String ls_gs,ls_sql
decimal{2} ls_gsjg

if dwo.name='gs1' then
this.accepttext( )

ls_gs = this.object.gs1[row]

ls_sql ="select round(to_number("+ ls_gs + "),0) from dual"

declare cur_test dynamic cursor for sqlsa;
prepare sqlsa from :ls_sql;
open dynamic cur_test;
fetch cur_test into:ls_gsjg;
do while sqlca.sqlcode=0

fetch cur_test into:ls_gsjg;
this.object.parent_many[row] = ls_gsjg
loop
close cur_test;

end if

原文地址:https://www.cnblogs.com/Bokeyan/p/11677801.html