Jump to content

subreport not displayed in the main report


nirum

Recommended Posts

Hi All,

  I composed a report  MainReport with a subreport SubReport - the main report and the sub report execute fine by themselves. Howver, the main report does not display the sub report. In the iReport designer, the design shows the subreport embedded in the main. But on execution, it never shows the details the subreport contains in the main report.

 I have attached both the MainReport.jrxml and the SubReport.jrxml. I am passing a parameter "Name" to the subreport based on which it is supposed to show some more details for that name.

 Any help/pointers would be appreciated.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi Nirum,

I spotted two things which might explain this. Firstly you are not passing a value into the parameter of the sub report.

Right Mouse on the sub-report elment -> Properties -> Subreport (Other)

Add the expression $F{NAME} to the NAME parameter.

Then in the sub report itself the user of $P{NAME} needs to be quoted and also have the !

WHERE eg.NAME = '$P!{NAME}'

If none of that fixes the problem then the only other explanation would be that the sub-report query does not find any rows.

 

Hope that helps

Peter Gale

Ingres Corporation

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...