Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 23rd, 2013  |  syntax: None  |  size: 0.48 KB  |  views: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. mainreport = JasperCompileManager.compileReport(//path of mainreport.jrxml);
  2. subreport = JasperCompileManager.compileReport(//path of subreport.jrxml);
  3. Map<String, Object> params = new HashMap<String, Object>();
  4. params.put("SUB_REPORT", subreport);
  5. params.put("DATA_SOURCE", empService.getEmpProject());
  6.  
  7. jprint1 = JasperFillManager.fillReport(mainreport,params,new JRBeanCollectionDataSource(empService.getEmpBean()));
  8. JasperExportManager.exportReportToPdfFile(jprint1, "C://Test.pdf");
clone this paste RAW Paste Data