JasperReport jasperReport;
JasperPrint jasperPrint;
JasperViewer jasperViewer;
try {
jasperReport = JasperCompileManager.compileReport("teste.jrxml");
jasperPrint = JasperFillManager.fillReport(jasperReport, new HashMap(), new JREmptyDataSource());
jasperViewer = new JasperViewer(jasperPrint);
jasperViewer.show();
JasperReport jasperReport = null;
JasperPrint jasperPrint = null;
JasperViewer jasperViewer = null;
try {
jasperReport = (JasperReport) JRLoader.loadObject("teste.jasper");
jasperPrint = (JasperPrint) JasperFillManager.fillReport(jasperReport, new HashMap(), new JREmptyDataSource());
jasperViewer = new JasperViewer(jasperPrint);
jasperViewer.setTitle("programa de teste");
jasperViewer.setVisible(true);
} catch (JRException e1) {
e1.printStackTrace();
}
# posted by ointernetinho : 1:58 AM