private boolean importReportLines() { String sql = "select * from i_reportlineset rls where " + "rls.pa_reportlineset_id is not null and rls.pa_reportline_id is null" + " and rls.isReportSource='N' "; try { PreparedStatement pstmt = DB.prepareStatement(sql, trxName); ResultSet rs = pstmt.executeQuery(); while (rs.next()) { // Creamo El conjunto de lineas del informe CReportLine rl = new CReportLine(getCtx(), 0, trxName); X_I_ReportLineSet ir = new X_I_ReportLineSet(getCtx(), rs, get_TrxName()); rl.setName(ir.getName()); rl.setDescription(ir.getDescription()); rl.setPA_ReportLineSet_ID(ir.getPA_ReportLineSet_ID()); rl.setSeqNo(ir.getSeqNo()); rl.setPrintLineNo(ir.getPrintLineNo()); rl.setFunc(ir.getFunc()); rl.setLineType(ir.getLineType()); rl.setPostingType(ir.getPostingType()); rl.setAmountType(ir.getAmountType()); rl.setIsPrinted(ir.isPrinted()); rl.setChangeSign(ir.isChangeSign()); rl.setNegativeAsZero(ir.isNegativeAsZero()); rl.setIsEverPrinted(ir.isEverPrinted()); rl.setIsPageBreak(ir.isPageBreak()); rl.setIsBold(ir.isBold()); rl.setIndentLevel(ir.getIndentLevel()); // Grabamos la linea importada if (rl.save() == false) { log.log(Level.SEVERE, "Error grabando la linea de informe."); return false; } // Guardamos el PA_ReportLine_ID en la tabla de importacion ir.setPA_ReportLine_ID(rl.getPA_ReportLine_ID()); ir.setI_IsImported(true); if (ir.save(trxName) == false) { log.log(Level.SEVERE, "Error guardando el PA_ReportLine_ID en la tabla de importacion."); return false; } } } catch (SQLException e) { log.log(Level.SEVERE, "Fallo al crear el conjunto de lineas de informe: " + e); return false; } return true; }