Interactive features of JasperReports without invo

2019-07-29 12:45发布

问题:

I have a few reports that I developed, compiling jrxmls using Java, filling reports and displaying report output in IFrame (Jsp). Even though I used table components I can't see any interactive features in report, Question I have:

Are there any other alternatives that I can acheive interactive features like Sorting, Filtering etc.., without using JasperReports Server?

回答1:

The same question was asked on the jaspersoft community site. Duplicating my answer here:

There is a sample - webapp-repo(https://github.com/Jaspersoft/jasperreports/tree/master/jasperreports/demo/samples/webapp-repo) that comes with the jasperreports project - in which most of the interactive features that JasperReports Server exposes can be achieved in a servlet container.

To run the sample:

  1. Download the jasperreports project source files(https://github.com/Jaspersoft/jasperreports). If you want a stable version pick the latest tag

  2. Install apache ant if you don't have it

  3. Build the main project(the root of the <jasperreports-project> that contains a build.xml) with: ant alljars

  4. Navigate to <jasperreports-project>/demo/samples/webapp-repo and create the application war with: ant war

  5. Deploy the jasperreports.war to a servlet container like Tomcat