Guest User

Untitled

a guest
Aug 28th, 2018
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. jasper report in jruby
  2. JasperReport jasperReport;
  3. JasperPrint jasperPrint;
  4. HashMap jasperParameter = new HashMap();
  5. jasperReport = JasperCompileManager.compileReport("C://report2.jrxml");
  6. Class.forName("com.mysql.jdbc.Driver").newInstance();
  7. Connection conn = null;conn = DriverManager.getConnection("jdbc:mysql://localhost/productexample_development","root","");
  8. jasperPrint = JasperFillManager.fillReport(jasperReport,jasperParameter, conn);
  9. JasperExportManager.exportReportToPdfFile(jasperPrint, "C://sample_report.pdf");
  10. JasperExportManager.exportReportToHtmlFile(jasperPrint, "C://sample_report.HTML");
Add Comment
Please, Sign In to add comment