views:

1571

answers:

2

Hi,

I am using iReport 3.7.0. The subreport wizard screen do not show my any Javabean class to select. Please let me know if anybody has encountered this problem and got a solution.

alt text

alt text

Creation of PersonDatasource:

alt text alt text

Source code for the Javabeans avialable at

http://www.brucephillips.name/jasperreports/examplesource.zip

Thanks Nayn

A: 

I created report separatly and added that as a subreport in the main report. I had to tweek the jrxml a little bit and DONE. Subreport with Javabeans works fine now.

<subreport>
   <reportElement x="100" y="20" width="355" height="20"/>
   <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{phones})]]>
        </dataSourceExpression>
   <subreportExpression class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "report_sub.jasper"]]>
        </subreportExpression>
</subreport>
Nayn
However iReport does not behave as expected in the Subreport creation wizard. That bug needs to be resolved.>> http://jasperforge.org/plugins/mantis/view.php?id=4480
Nayn
A: 

I have the same problem. but what do you modify your xml. thanks

Thang Hoang
not sure what you meant.
Nayn
I got an problem that cannot print data on subreport. but because of I am using report 3.7.1 (already setting compatible to 3.5.1) but my web server using 3.5.1, thanks
Thang Hoang