jasperreport生成pdf_jasperreport 导出excel_jasperreport json(64)

电脑杂谈  发布时间:2017-02-04 10:28:36  来源:网络整理

We can instruct the reporting engine to cache this particular subreport design object. This way we are

making sure that the subreport design will be loaded from disk or from its particular location only once

and then it will only be reused every time it has to be filled.

By setting the isUsingCache attribute to "true", the reporting engine will try to recognize

previously loaded subreport design objects, using their specified source. For example, it will recognize

a subreport object if its source is a file name that it has already loaded, or if it is the same URL.

This caching functionality is available only for subreport elements that have expressions returning

java.lang.String objects as the subreport design source, representing file names, URLs or

classpath resources. That's because the engine uses the subreport source string as the key to recognize

that it is the same subreport design that it has already cached.

The JasperReports Ultimate Guide

Page 65

9.1 Subreport Parameters

Since subreports are normal reports themselves, they are compiled or filled in the same way. This

means that they also require a data source from which to get the data when they are filled and that can

also receive parameters, for the additional information they have to use when being filled.

There are two ways to supply the parameter values to a subreport and they can be used simultaneously,

if desired.

You can supply a map containing the parameter values, like we do when filling a normal report with


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-30468-64.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    • 王海洋
      王海洋

      我以FFF团的名义召唤你们

    • 烈祖慕容儁
      烈祖慕容儁

      这也是后来的战列舰大战通常采取的战法

    • 明神宗
      明神宗

      依旧帅#宋茜4walls#

    热点图片
    拼命载入中...