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

posted @ 2019-10-15 15:10  博客燕  阅读(814)  评论(0编辑  收藏  举报