I am creating a project in which I generate a report and I would like to print it, I am using iReport and JasperReport.
The code to send it to print is as follows:
try {
JasperReport jasperReport=(JasperReport)JRLoader.loadObject("C:\Users\Juan\Documents\NetBeansProjects\Archivero\src\Reportes\Archivos.jasper");
JasperPrint jasperPrint=JasperFillManager.fillReport(jasperReport,null,con.conexion());
JRExporter exporter = new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT,jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE,new java.io.File("Reporte_Pendientes.pdf"));
exporter.exportReport();
} catch (JRException e) {
JOptionPane.showMessageDialog(null,"Error al generar el PDF "+e);
}
And I get the following error: