问题描述
jasperreports-javaflow的用法是什么?
What is the usage of jasperreports-javaflow?
我在下面提到了两个链接,我不清楚。你能详细说明吗?
I referred the below two links, Am not clear. could you elaborate!
推荐答案
jasperreports-javaflow是标准JasperReports jar的变种可以在禁止生成新Java线程的环境中使用。例如,几年前使用EJB容器就是这种情况(不知道是否仍然如此)。但在大多数情况下,标准的JasperReports jar很好,你不必担心jasperreports-javaflow。
jasperreports-javaflow is a variant of the standard JasperReports jar that can be used in environments where spawning new Java threads is prohibited. That was the case, for instance, with EJB containers some years ago (don't know if it's still the case). But in most cases the standard JasperReports jar is fine and you don't need to worry about jasperreports-javaflow.
JasperReports创建线程(默认情况下)来渲染子报告(和表元素)因为页/列中断要求子报表生成在调用堆栈中的某个点停止,然后在新页/列上继续。 提供了一种无需线程的机制,以及jasperreports-javaflow jar有为Javaflow continuation配备的类。另请参阅。
JasperReports creates threads (by default) to render subreports (and table elements) because page/column breaks require the the subreport generation to stop at some point in the call stack and then resume on the new page/column. Commons Javaflow continuations provide a mechanism to do that without threads, and the jasperreports-javaflow jar has classes instrumented for Javaflow continuations. Also see the JasperReports subreport sample documentation.
要使用continuation子报表运行程序,您需要在类路径中包含jasperreports-javaflow jar(常规jasperreports jar的而不是,您不应该同时使用这两者)以及Commons Javaflow jar(例如)并设置以下属性在jasperreports.properties中:
To use the continuations subreport runner, you need to include the jasperreports-javaflow jar on the classpath (instead of the regular jasperreports jar, you shouldn't have both) along with a Commons Javaflow jar (for instance the one at http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/org/apache/commons/commons-javaflow/20160505/) and to set the following property in jasperreports.properties:
net.sf.jasperreports.subreport.runner.factory=net.sf.jasperreports.engine.fill.JRContinuationSubreportRunnerFactory
更新: 以vers开头离子6.6.0,JasperReports使用而不是Apache Commons Javaflow(用于支持Java 8) )。因此,您需要在类路径上使用net.tascalate.javaflow.api jar而不是Commons Javaflow jar(例如)。
Update: Starting with version 6.6.0, JasperReports uses tascalate-javaflow instead of Apache Commons Javaflow (for Java 8 support). Therefore instead of a Commons Javaflow jar you'll need to have a net.tascalate.javaflow.api jar on the classpath (such as net.tascalate.javaflow.api-2.2.1.jar).
这篇关于jasperreports-javaflow的用法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!