Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1.  private JasperPrint getJasperPrint(Map<String, Object> parameters, String s) {
  2.         JasperReport jasperReport;
  3.         try {
  4.             InputStream inputStream = new ClassPathResource(s).getInputStream();
  5.             jasperReport = JasperCompileManager.compileReport(inputStream);
  6.             JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, new JREmptyDataSource());
  7.             return jasperPrint;
  8.         } catch (JRException | IOException e) {
  9.             throw new ValidationException(e);
  10.         }
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement