在pb一个报表dw_10中插入一个报表dw_1,我想通过对dw_1进行where条件来显示数据出来,但是我如何获得dw_1这个对象,对它进行数据操作呢
以下写法请指点或者有更好的方法请提议,谢谢
string ls_e4,ls_e5,ls_e3
ls_e3="sono='"+sono+"' and soseq='"+soseq+"'"
datastore ids_print
dataWindowChild ldw_child
ids_print=create datastore
ids_print.dataobject = 'dw_10'
ids_print.settransobject(sqlca)
dw_10.modify( "datawindow.processing = '5 ' ")
ids_print.getChild( "dw_1",ldw_child)
ldw_child.settransobject(sqlca)
ls_e4= ldw_child.DataWindow.Table.Select
long ll_pos6
ll_pos6 = pos(ls_e4 , " where ")
if ll_pos6>0 then
ls_e4 = left(ls_e4 , ll_pos6 - 1)
end if
ls_e5=ls_e4+" where " +ls_e3
ldw_child.Object.DataWindow.Table.Select=ls_e5
ldw_child.retrieve( )
------解决方案--------------------
- C/C++ code
string ls_e4,ls_e5,ls_e3ls_e3="sono='"+sono+"' and soseq='"+soseq+"'"datastore ids_print dataWindowChild ldw_child dw_10.getChild( "dw_1",ldw_child)ldw_child.settransobject(sqlca)ls_e4= ldw_child.DataWindow.Table.Select long ll_pos6ll_pos6 = pos(ls_e4 , " where ")if ll_pos6>0 then ls_e4 = left(ls_e4 , ll_pos6 - 1)end ifls_e5=ls_e4+" where " +ls_e3ldw_child.Object.DataWindow.Table.Select=ls_e5ldw_child.retrieve( )