I did a small program in java to generate budget reports, I used jasper Ireport to do so, I did, I tested, it generated budgets everything working on my computer. When I installed it on a friend's computer it worked fine except for the reports, nor even appears blank, it looks like this:
Inthecode,theimagepath,itseems,issetcorrectly.
publicvoidimprimeRelatorio(){ConexaoMySqlco=newConexaoMySql();co.setUrl("jdbc:mysql://localhost:3306/poc");
co.setUsuario("root");
co.setSenha("");
String src = "C:\orcamento.jasper";
Map<String, Object> parametros = new HashMap<String, Object>();
parametros.put("id",(Integer.parseInt(inpId.getText())));
System.out.println("parametros="+parametros);
JasperPrint jasperPrint = null;
try {
jasperPrint = JasperFillManager.fillReport(src, parametros, co.getConnection());
} catch (JRException ex) {
Logger.getLogger(TelaControle.class.getName()).log(Level.SEVERE, null, ex);
}
JasperViewer view = new JasperViewer(jasperPrint, false);
view.setVisible(true);
System.out.println("view" +view);
}
Iranthecmdtoseetheoutputandactuallythepathoftheimageseemstobecorrect.
The strangest thing is that on my computer it works normally.