JRBeancollection data transfer to receive report and report

I want to transfer the JRBeancollection database to the main report and from the main report to a separate report. I have included this report in the summary section of the main report. please indicate the steps that I want to do in iireport, including the parameters inbuld, how to set.

0
source share
2 answers

Finally, I did it.

In fact, the data source did not arrive in the report. So I changed the property when there is no data for all partitions, no data ...

Then I passed the collection variable in which I got the subregister entries.

Using parameters.put("shape_data_all", allShape_Caliberation);

Then I created a parameter in the main report. And changed his class to java.Util.Collection .

Then, in the subreport connection type= property, use a data source expression

Data source output new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{shape_data_all})

Then we added the fields to the subtitle, the same as my bean properties.

Thanks.

+1
source

I'm not sure, but try the following:

 <subreport> <reportElement x="261" y="25" width="200" height="100"/> <dataSourceExpression><![CDATA[$P{REPORT_DATA_SOURCE}]]></dataSourceExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "subreport.jasper"]]></subreportExpression> </subreport> 

Of course, you should use "subreportExpression" as you do in your report, this is just a sample, a useful line for your problem is the placement of "dataSourceExpression".

0
source

All Articles