reporting engine will affect the java.util.Map object it receives, adding the built-in
report parameter values that correspond to the subreport. This map is also affected by the
individually specified subreport parameter values, as already explained above.
In order to avoid altering the original java.util.Map object that you send, you can wrap it
in a different map, before supplying it to the subreport filling process like this:
new HashMap(myOriginalMap)
This way, your original map object remains unaffected and modifications are made to the
wrapping map object.
This is useful especially when you want to supply to your subreport the same set of
parameters that the master report has received and you use the built-in
REPORT_PARAMETERS_MAP report parameter of the master report. However, you don't want
to affect the value of this built-in parameter and you will wrap it like this:
<parametersMapExpression>
new HashMap($P{REPORT_PARAMETERS_MAP})
</parametersMapExpression>
The JasperReports Ultimate Guide
Page 66
9.2 Subreport Data Source
Subreports need a data source in order to generate their content, just like normal report do.
In the 3.4 Filling Reports chapter of this book we have seen that when filling a report you have to
supply either a data source object or a connection object, depending on that particular report type. That
is if it has an internal SQL query and you want to have it executed to obtain the report data or you
supply the report data yourself.
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-30468-66.html
1和之前的都不卡听卖手机的说个别更新了会卡
你知道美国派多少
世界格局由美国一超独霸转向多极并起并存的时代——更是中华盛世主导世界时代的到来