-1
Hello, I’m new to Jasperreports and I’m facing a problem to be able to generate my first report (a DANFE), everything I’ve seen about Jasper so far involved database, as my application does not use database ignored this and I’m trying to pass the data via Hashmap, everything seems to be ok, the application works perfectly, but when the report will open I get a message saying that the document has no pages, I tested other JRXML layouts that I found around, no open, follow the code that loads Jasper.
private void loader(){
try{
JasperReport jr = JasperCompileManager.compileReport("src/jasper/teste.jrxml");
Map dados = new HashMap();
dados.put("Emit_CNPJ", this.nfe.getEmitente().getCnpj());
JasperPrint jp = JasperFillManager.fillReport(jr, dados);
JasperViewer jv = new JasperViewer(jp, false);
jv.setTitle("DANFE");
jv.setVisible(true);
debug.log("DANFE carregada com sucesso.");
}catch(JRException ex){
debug.log("Falha ao carregar JasperReports.");
//Logger.getLogger(Visualizer.class.getName()).log(Level.SEVERE, null, ex);
}
}
Your test.jrxml file has all the right parameters?
– DiegoAugusto