SHARE
TWEET

Untitled

a guest Feb 23rd, 2013 24 Never
  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");
RAW Paste Data
Top