|
楼主 |
发表于 2014-4-23 09:00:04
|
显示全部楼层
主要是因为action中的SQL中的where条件使用了in,且in后面是参数。就象 where id in (:checiIds)
常规的参数传递方法,把参数转到aciton后识别出问题。
justep.xbl('reportDataTask').setStringVar('checkIds', "("+condiction+")");
justep.xbl('reportTask').refresh();
这样传参调用在只checkIds只有一个ID时是没问题的,如果是多个,checkIds中是这样的话,'123','23423','342',报表就显示不出来了。
所以在action中采用了另外方法来接收参数。
//由于sql的in语法中的参数不能直接用setStringVar来传,所以有下面一段
String checkIds="('')";
Iterator it=variables.entrySet().iterator();
if(it.hasNext()) {
Entry entry = (Entry)it.next();
checkIds=(String) entry.getValue();
}
//使用对数在java中组装就可以了
String ksqlu;
ksqlu = "update PO_LKL_Tasks t set t.fPrintDate = :currentDate() where t.fLKL_TaskSN in "+checkIds;
感谢fengwei 替我远程解决了。 |
|