I need to pass to my subreport a dataSource with help of master report's List<String>
parameter. I don't know what is a type of dataSource is correct and how to get value in subreport.
The snippet from my master report:
<parameter name="seznamPriloh" class="java.util.List" isForPrompting="false"/>
....
<subreport>
<reportElement x="0" y="56" width="555" height="76"/>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{seznamPriloh})]]></dataSourceExpression>
<subreportExpression><![CDATA[cz.alis.keong.jasjdr.reporting.ReportCompiler.compile("R79_SeznamPriloh")]]></subreportExpression>
</subreport>
The snippet from my subreport:
<detail>
<band height="23">
<textField>
<reportElement x="56" y="3" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{}]]></textFieldExpression>
</textField>
</band>
</detail>
Please advise me how to pass the datasource to subreport via master report's parameter of java.util.List<String>
type.
Edit: 08.14 14:20
Add Tags to Java
Edit: 08.14 15:30
relates with How do I print a list of strings contained within another list in iReport? and works for 4.5.0 And List<String>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…