Ejemplo n.º 1
0
 @RequestMapping(value = "/printEnumeration/{enumerationId}")
 @ResponseBody
 public void printEnumeration(@PathVariable int enumerationId, HttpServletResponse response) {
   ReportParameterList rptParm = new ReportParameterList();
   rptParm.addParameter("id", enumerationId);
   String jrxmlPath = "/goodCirculation/enumeration/EnumerationReport.jrxml";
   String pdfName = "EnumerationReport.pdf";
   ReportUtility reportUtility = new ReportUtility(rptParm, jrxmlPath);
   reportUtility.outPutPDFReport(response, pdfName);
 }
 @RequestMapping(value = "/report/{documentId}")
 public void report(@PathVariable Long documentId, HttpServletResponse response) {
   // ------------------ set Parameters for Report ---------------
   ReportParameterList rptParm = new ReportParameterList();
   rptParm.addParameter("ALLOCATE_BASE_ID", documentId.toString());
   // ------------------------------------------------------------
   String jrxmlPath = "/mohemat/dispatching/training/trainingReport.jrxml";
   String pdfName = "TrainingReport.pdf";
   ReportUtility reportUtility = new ReportUtility(rptParm, jrxmlPath);
   reportUtility.outPutPDFReport(response, pdfName);
 }