Tuesday, May 18, 2010

Subreport not displayed in main Jasper Report ireport

Hi
I am sure somebody would face this problem..
Using ireport 3.7.2

Subreport in Ireport is not displayed until I do the following.

<subreport><reportelement height="100" width="200" x="146" y="100"><subreport>
<reportelement height="100" width="200" x="146" y="100">
<datasourceexpression></datasourceexpression>
<subreportexpression class="java.lang.String"></subreportexpression></reportelement></subreport>
<datasourceexpression></datasourceexpression>
<subreportexpression class="java.lang.String"></subreportexpression></reportelement></subreport>

Remember to set properties of subreport (Also if ur using a static text to display in subreport)

Connection Type >>>> Use a datasource expression
Data Source Expression >>>> new net.sf.jasperreports.engine.JREmptyDataSource()


Make Sure you select "When No Data" Property to All Section No Details. most of the time Problem would be that data being set properly to subreport.




Look at this link for added information

http://www.jasperassistant.com/docs/guide/index.html

1 comment:

  1. Thanks for your post. This really worked for me

    ReplyDelete