不涉及 JasperReports Server 的 JasperReports 交互特性
Interactive features of JasperReports without involving JasperReports Server
我开发了一些报告,使用 Java 编译 jrxmls,填充报告并在 IFrame (Jsp) 中显示报告输出。尽管我使用了 table 组件,但我在报告中看不到任何交互功能,我有以下问题:
在不使用 JasperReports Server 的情况下,是否还有其他替代方法可以实现排序、过滤等交互功能?
jaspersoft community site 上有人问了同样的问题。在这里复制我的答案:
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:
Download the jasperreports project source files(https://github.com/Jaspersoft/jasperreports). If you want a
stable version pick the latest tag
Install apache ant if you don't have it
Build the main project(the root of the <jasperreports-project> that contains a build.xml) with: ant alljars
Navigate to <jasperreports-project>/demo/samples/webapp-repo and create the application war with: ant war
Deploy the jasperreports.war to a servlet container like Tomcat
我开发了一些报告,使用 Java 编译 jrxmls,填充报告并在 IFrame (Jsp) 中显示报告输出。尽管我使用了 table 组件,但我在报告中看不到任何交互功能,我有以下问题:
在不使用 JasperReports Server 的情况下,是否还有其他替代方法可以实现排序、过滤等交互功能?
jaspersoft community site 上有人问了同样的问题。在这里复制我的答案:
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:
Download the jasperreports project source files(https://github.com/Jaspersoft/jasperreports). If you want a stable version pick the latest tag
Install apache ant if you don't have it
Build the main project(the root of the <jasperreports-project> that contains a build.xml) with: ant alljars
Navigate to <jasperreports-project>/demo/samples/webapp-repo and create the application war with: ant war
Deploy the jasperreports.war to a servlet container like Tomcat