RonaldoZH 2015-07-21 09:44
浏览 1059

求大神帮忙!Birt页面传值,用property binding接不到值..

Query Text:

var query="select n.xh,n.sycj,n.sjcj,n.bscj,n.qzcj,n.qmqcj,n.llzcj,m.xm,m.kccj,m.djm,m.zcj,m.jdcj,m.kssj,m.xdfsmc,m.bkfssm,m.wtgyysm,m.bjh,m.bm,m.lrztsm,m.xsh,m.bz,m.order1,m.order2 from "+

"(SELECT xh,"+
" case when sycj<0 then (select djm from code_cjdj b where sycj=b.djcj) "+
" else to_char(sycj) end sycj,"+
" case when sjcj<0 then (select djm from code_cjdj b where sjcj=b.djcj) "+
" else to_char(sjcj) end sjcj,"+
" case when bscj<0 then (select djm from code_cjdj b where bscj=b.djcj) "+
" else to_char(bscj) end bscj,"+
" case when qzcj<0 then (select djm from code_cjdj b where qzcj=b.djcj) "+
" else to_char(qzcj) end qzcj,"+
" case when qmqcj<0 then (select djm from code_cjdj b where qmqcj=b.djcj) "+
" else to_char(qmqcj) end qmqcj,"+
" case when llzcj<0 then (select djm from code_cjdj b where llzcj=b.djcj) "+
" else to_char(llzcj) end llzcj "+
"from (select (select a.zcj "+
" from cj_lrcjmxb a "+
" where a.zxjxjhh = t.zxjxjhh and a.kch = t.kch and "+
" a.xh = t.xh and a.kxh = t.kxh and a.kssj = t.kssj and "+
" a.cjfldm = '002') as sycj, "+
"(select a.zcj "+
" from cj_lrcjmxb a "+
" where a.zxjxjhh = t.zxjxjhh and a.kch = t.kch and "+
" a.xh = t.xh and a.kxh = t.kxh and a.kssj = t.kssj and "+
" a.cjfldm = '003') as sjcj, "+
"t.bscj, "+
"t.qzcj, "+
"t.qmqcj, "+
"t.xh, "+
"t.zcj as llzcj "+
"from cj_lrcjmxb t where ";

var zxjxjhh=params["zxjxjhh"].value;
var kch=params["kch"].value;
var kxh= params["kxh"].value;
var kssj=params["kssj"].value;
var xsh= params["xsh"].value;
var bjh= params["bjh"].value;

if(kssj != null){

query += " t.zxjxjhh ='" + zxjxjhh + "' and t.kch = '"+kch+"' and t.kxh ='"+kxh+"' and t.kssj like '%"+kssj+"%' and t.cjfldm = '001'))n,";

} else{
query += " t.zxjxjhh ='" + zxjxjhh + "' and t.kch = '"+kch+"' and t.kxh ='"+kxh+"' and t.cjfldm = '001'))n,";

}

query+="(SELECT cj_lrcjb.xh,xs_xjb.xm,kccj,code_cjdj.djm,decode(cjlrfsdm,'001',to_char(kccj),'002',djm) zcj,cj_lrcjb.jdcj,cj_lrcjb.kssj,code_xdfsb.xdfsmc,code_bkfsb.bkfssm,code_wtgyyb.wtgyysm,xs_xjb.bjh,code_bjb.bm,cj_lrztb.lrztsm, xs_xjb.xsh,cj_lrcjb.bz,xs_xjb.xsh||xs_xjb.zyh||xs_xjb.bjh||xs_xjb.xh as order1,xs_xjb.xh as order2 from cj_lrcjb,xs_xjb,code_cjdj,code_xdfsb,code_bkfsb,code_wtgyyb,code_bjb,cj_lrztb "+
"WHERE cj_lrcjb.xh = xs_xjb.xh(+) and cj_lrcjb.lrztdm = cj_lrztb.lrztdm(+) and cj_lrcjb.djcj = code_cjdj.djcj(+) and cj_lrcjb.xdfsdm = code_xdfsb.xdfsdm(+) and xs_xjb.bjh=code_bjb.bjh(+) "+
"and cj_lrcjb.bkfsdm = code_bkfsb.bkfsdm(+) and cj_lrcjb.wtgyydm = code_wtgyyb.wtgyydm(+) and cj_lrcjb.zxjxjhh ='" + zxjxjhh + "' and cj_lrcjb.kch = '"+kch+"' and cj_lrcjb.kxh ='"+kxh+"'";

if(kssj!=null){
query += " and cj_lrcjb.kssj like '%"+kssj+"%'";
}
if(xsh!=null){
query += " and xs_xjb.xsh like '%"+xsh+"%'";
}

if(bjh!=null){
query += " and xs_xjb.bjh like '%"+bjh+"%'";
}
query += " order by xs_xjb.xsh,xs_xjb.zyh,xs_xjb.bjh,xs_xjb.xh )m where n.xh=m.xh";

this.text = query;

页面:

"/frameset?__report=reports/new_report_1.rptdesign&__format=HTML&zxjxjhh=2008-2009-1-1&kch=3720006&kxh=01"
但是打印出来的sql zxjxjhh,kch,kxh全是null

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 微信公众号自制会员卡没有收款渠道啊
    • ¥15 stable diffusion
    • ¥100 Jenkins自动化部署—悬赏100元
    • ¥15 关于#python#的问题:求帮写python代码
    • ¥20 MATLAB画图图形出现上下震荡的线条
    • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
    • ¥15 perl MISA分析p3_in脚本出错
    • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
    • ¥15 ubuntu虚拟机打包apk错误
    • ¥199 rust编程架构设计的方案 有偿