查询按钮的脚本:
string r_nkjqj,r_ykjqj_min,r_ykjqj_max,r_ccsqdh_min,r_ccsqdh_max,r_jt_code
string r_zc_code,r_bm_code,r_cfdd,r_zdr,r_zdrq_min,r_zdrq_max,r_shbj,r_zgqzbj
dec r_jkje_min,r_jkje_max
tab_cond.tabpage_main.dw_zdr.accepttext()
tab_cond.tabpage_item.dw_bm_code.accepttext()
tab_cond.tabpage_item.dw_jt_code.accepttext()
tab_cond.tabpage_item.dw_zc_code.accepttext()
r_nkjqj=tab_cond.tabpage_main.em_nkjqj.text
r_ykjqj_min=tab_cond.tabpage_main.em_ykjqj_min.text
r_ykjqj_max=tab_cond.tabpage_main.em_ykjqj_max.text
r_ccsqdh_min=tab_cond.tabpage_main.sle_ccsqdh_min.text
r_ccsqdh_max=tab_cond.tabpage_main.sle_ccsqdh_max.text
r_cfdd=tab_cond.tabpage_item.sle_cfdd.text
r_zdr=tab_cond.tabpage_main.dw_zdr.getitemstring(1,"zy_code")
r_bm_code=tab_cond.tabpage_item.dw_bm_code.getitemstring(1,"bm_code")
r_jt_code=tab_cond.tabpage_item.dw_jt_code.getitemstring(1,"jt_code")
r_zc_code=tab_cond.tabpage_item.dw_zc_code.getitemstring(1,"zc_code")
r_jkje_min=tab_cond.tabpage_item.em_jkje_min.text
r_jkje_max=tab_cond.tabpage_item.em_jkje_max.text
r_zdrq_min=tab_cond.tabpage_main.em_rq_min.text
r_zdrq_max=tab_cond.tabpage_main.em_rq_max.text
if tab_cond.tabpage_main.rb_qb.checked = true then
r_shbj = "%"
elseif tab_cond.tabpage_main.rb_ysh.checked = true then
r_shbj = "Y"
else
r_shbj = "N"
end if
if tab_cond.tabpage_main.rb_qzqb.checked = true then
r_zgqzbj = "%"
elseif tab_cond.tabpage_main.rb_yqz.checked = true then
r_zgqzbj = "Y"
else
r_zgqzbj = "N"
end if
r_zdr=gf_string(r_zdr)
r_bm_code=gf_string(r_bm_code)
r_jt_code=gf_string(r_jt_code)
r_zc_code=gf_string(r_zc_code)
r_jkje_min=gf_string(r_jkje_min))
r_jkje_max=gf_string(r_jkje_max))
r_cfdd=tab_cond.tabpage_item.sle_cfdd.text
r_cfdd=gf_string(r_cfdd)
CHOOSE CASE i_type
CASE 'ccsqcx' //申请查询
dw_ccsqcx.retrieve(r_nkjqj,r_ykjqj_min,r_ykjqj_max,r_ccsqdh_min,r_ccsqdh_max,r_jt_code,r_zc_code,r_bm_code,r_cfdd,r_jkje_min,r_jkje_max,r_zdr,r_zdrq_min,r_zdrq_max,r_shbj,r_zgqzbj)
CASE 'ccsqlbcx'
dw_ccsqcx.retrieve(r_nkjqj,r_ykjqj_min,r_ykjqj_max,r_ccsqdh_min,r_ccsqdh_max,r_zdr,r_zdrq_min,r_zdrq_max,r_shbj,r_zgqzbj)
END CHOOSE
gf_dw_count(dw_ccsqcx,sle_count)
保存时出错,提示:
Error C0008: Incompatible types in assignment: decimal,string
Error C0008: Incompatible types in assignment: decimal,string
Error C0052: Bad argument list for function: gf_string
Error C0052: Bad argument list for function: gf_string
如果将出错的这几行设为注释,程序可以运行,但是输入查询条件,点击查询后没有反应
------解决方案--------------------
先保证编译通过才能看结果!
------解决方案--------------------
Incompatible types in assignment: decimal,string
格式转换问题,一个是decimal,一个是string
Bad argument list for function: gf_string
函数传进去的参数不对
自己跟踪调试dw_ccsqcx.retrieve()参数的值