introducing subreports into master reports.
XML Syntax
<!ELEMENT subreport (reportElement, parametersMapExpression?,
subreportParameter*, (connectionExpression | dataSourceExpression)?,
subreportExpression?)>
<!ATTLIST subreport
isUsingCache (true | false) "true"
>
<!ELEMENT parametersMapExpression (#PCDATA)>
<!ELEMENT subreportParameter (subreportParameterExpression?)>
<!ATTLIST subreportParameter
name NMTOKEN #REQUIRED
>
<!ELEMENT subreportParameterExpression (#PCDATA)>
<!ELEMENT connectionExpression (#PCDATA)>
<!ELEMENT dataSourceExpression (#PCDATA)>
<!ELEMENT subreportExpression (#PCDATA)>
<!ATTLIST subreportExpression
class (java.lang.String | java.io.File | java.net.URL |
java.io.InputStream | dori.jasper.engine.JasperReport) "java.lang.String"
>
Subreport Expression
Just like normal report designs, subreport designs are in fact dori.jasper.engine.JasperReport
objects. Those are obtained after compiling a dori.jasper.engine.design.JasperDesign object
as seen in the 3.2 Compiling Report Designs section of this book.
The JasperReports Ultimate Guide
Page 64
We have seen that the text field elements have an expression that will be evaluated to obtain the text
content to display. The image elements have an expression representing the source of the image to
display. In the same way, subreport elements have an expression that is evaluated at runtime, in order
to obtain the source of the dori.jasper.engine.JasperReport object to load.
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-30468-62.html
关键是