|
楼主 |
发表于 2017-3-27 12:40:44
|
显示全部楼层
调用的是存储过程,在java里获取的时候就少了一条了,不好意思,估计不是报表的问题
conn = ModelUtils.getConnectionInTransaction("/aojing/gp/data");
// 创建一个 CallableStatement对象来调用数据库存储过程
// CallableStatement stat =
// conn.prepareCall("{call 存储过程的名称(?, ?)}");
proc = conn.prepareCall("{call DEBUGGERREPORT.DEBUGERFENXI (?,?,?,?)}");
proc.setString(1, masterid);
proc.registerOutParameter(2, Types.INTEGER);
proc.registerOutParameter(3, Types.VARCHAR);
proc.registerOutParameter(4, OracleTypes.CURSOR);
proc.execute();
// proc.g
int falg = proc.getInt(2);
String msg = proc.getString(3);
System.out.println("-----------------------------------------" + falg);
System.out.println(msg);
if (falg == 0) {
ResultSet rs = (ResultSet) proc.getObject(4);
// System.out.println(rs.getString(1)+" rstiaoshu");
while (rs.next()) {
System.out.println(rs.getObject(1));
System.out.println(rs.getObject(2));
System.out.println(rs.getObject(3));
System.out.println(rs.getObject(4));
table = com.justep.system.util.BizUtils.resultSet2Table(rs, "/aojing/gp/data");
System.out.println(table.size()+"size ");
System.out.println(table.getColumnCount()+"--------------------------");
}
} |
|