void subMenu4() throws IOException { boolean salir = false; do { System.out.println("--------------------------------------"); System.out.println("- Generacion de reportes -"); System.out.println("--------------------------------------"); System.out.println("1.-Ventas totales."); System.out.println("2.-Vuelos vendidos."); System.out.println("3.-Regresar al menu anterior"); System.out.println("--------------------------------------"); System.out.print("Opcion: "); String op = br.readLine(); switch (op) { case "1": r.imprimirTotal(); break; case "2": r.vueloVendidos(); break; case "3": salir = true; break; default: System.out.println("Opcion invalida"); salir = false; } } while (!salir); }
private void doReport(Discapacidad o) throws MissingReportException, JRException { Reportes r = new Reportes( DAO.getJDBCConnection(), SGD.getResources().getString("report.codigobarra"), "Archivo " + o.getClass().getSimpleName() + " N" + o.getBarcode()); r.addParameter("TABLA", o.getClass().getSimpleName()); r.addParameter("ID_TABLA", o.getId()); r.viewReport(); }