I'm trying to send an image as a parameter to a jasperRepor, but when I'm going to generate the report it tells me that the parameter is null.
public void generarReporte(String ruta) throws JRException {
try {
// File reportFile = new File("");
HashMap<String, Object> parametro = new HashMap<>();
InputStream io = this.getClass().getClassLoader().getResourceAsStream("IME/" + ruta);
parametro.put("logo", io);
System.out.println(ruta);
System.out.println(parametro.toString());
JasperReport jasperReport = (JasperReport) JRLoader.loadObject(new File("src\aplicacionmipe\report1.jasper"));
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parametro);
JasperViewer view = new JasperViewer(jasperPrint, false);
view.setVisible(true);
} catch (JRException ex) {
System.out.println("Error: " + ex);
}
}