Dynamic Jasper to Generate Dynamic Reports

This article will explain on how to use DynamicJasper in your project to generate the dynamic reports on demand.

The Jars required are:
  • DynamicJasper-3.1.5.jar( or any other latest one)
  • DynamicJasper-3.1.5-tests(or any other latest one)--this is optional

(1) In Controller: (2) In Service: (3)In DAO: (4)Specific Reports: PDF and xls:
(4 a) PDF Report:
In controller

(4 b)Excel Report: For Excel we can use the displayExcelReport method as shown below:

Here, List data parameter is of type ArrayList and has the list of the objects to be displayed on the page.
Happy Coding!

No comments:

Post a Comment