Pessoal,
estou com o seguinte problema,
minha aplicaçao hj, tem os relatorios em pdf, mas agora além do pdf querem em xls(excel), e como ja foi feito no ireport, queria saber como posso aproveitar sem mudar muito meu codigo.
hj é feito da seguinte forma pro pdf.
//nesse ponto busco o jrxml
public static final String RPT_EXTRATO_TURNO = “/rptExtratroTurno.jrxml”;
//seto no path
String reportPath = getRealPath(REPORT_DIR + RPT_EXTRATO_TURNO);
//seto as propriedades que faram o filtro pro meu pdf
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(“paramDataInicial”, getDataInicioTransacao());
properties.put(“paramDataFinal”, getDataFimTransacao());
properties.put(“CAMINHO_RELATORIO”, getRealPath(REPORT_DIR));
properties.put(“paramImageDir”, getRealPath(IMAGE_DIR));
properties.put(“CAMINHO_IMAGENS”, getRealPath(IMAGE_DIR));
properties.put(“idOperador”, getIdOperador());
properties.put(“niSeqTerm”, this.getIdTerminal());
properties.put(“idLocal”, this.getLocalId());
/* Abrindo o relatório */
try {
response.setContentType("application/pdf");
JPAResourceHibernate jResourceHibernate = new JPAResourceHibernate();
this.connection = jResourceHibernate
.getJdbcConnection(JPAResourceHibernate.PERSISTENCE_UNIT_DG_NET_HIBERNATE);
callReport(this.connection, reportPath, properties, this.response);
} catch (ServiceException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
eu uso Vraptor na minha aplicação…mas acho que naum interferem em nada…
AGradeço desde Já.