System.out.println("Printer Job Sended");
System.out.println("Printer Job Sent");
    public static boolean printReport(String key, Map parameters, ResourceBundle bundle,            Collection dataSource, String printerName) {        try {            JasperPrint jasperPrint = getReport(key, parameters, bundle, dataSource);            PrintService printService = PrinterManager.getPrintServiceByName(printerName);            if (jasperPrint != null && printService != null) {                JRPrintServiceExporter exporter = new JRPrintServiceExporter();                exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);                PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet();                printRequestAttributeSet.add(MediaSizeName.ISO_A4);                printRequestAttributeSet.add(OrientationRequested.PORTRAIT);                printRequestAttributeSet.add(new MediaPrintableArea(0, 0, 210, 297,                        MediaPrintableArea.MM));                exporter.setParameter(JRPrintServiceExporterParameter.PRINT_REQUEST_ATTRIBUTE_SET,                        printRequestAttributeSet);                exporter.setParameter(JRPrintServiceExporterParameter.PRINT_SERVICE, printService);                exporter.exportReport();                System.out.println("Printer Job Sended");                return true;            } else {        	if(jasperPrint == null) {        	    System.out.println("Couldn't find report " + key);        	}        	if(printService == null) {        	    System.out.println("Couldn't find print service " + printerName);        	}        	                return false;            }        } catch (JRException e) {            System.out.println("Unable to print");            e.printStackTrace();            return false;        }    }