Jump to content
Changes to the Jaspersoft community edition download ×

how to display a field from subreport to main repo


sivaraj

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

in your 'master' report you should setup a variable ("returnedData" for instance) of whatever data type you will be returning. Then when you create your subreport, modify it's properties from the master report (while looking at the box representing the subreport) and add the value to be returned on the returned values tab (forget if that's the exact name or not, but it is close). The value returned is the single value you want returned from the subreport and the return to value is the returnedData variable you setup earlier. You may then display that value in a band after the detail band is printed. Hope that helps.
Link to comment
Share on other sites

Hi CaptnTony,

 

Is this new feature in the iReport2.0.0? Any documentation on the Internet for reference? I have tried that however, it only shows built-in variables in the subreport, I need to manually key in the variable I created in the subreport. How about the Calculation Type being used?

 

I was using iReport0.4.0 long time ago and getting to use the iReport2.0.0. Any major update/enhancement between the two versions and the difference to note?

 

Thanks.

 

 

Best regards,

Ek Ming Siew

Link to comment
Share on other sites

Is this new feature in the iReport2.0.0?

 

No. It dates back pretty far (in versions)...

 

Any documentation on the Internet for reference?

 

See. Jasper Reports Homepage -> Wiki -> Samples -> Subreport Sample

 

You are correct, it does only show built in variables. So all you need to do is type the EXACT name of the variable as defined in your subreport. ("returnedData")

 

Calculation Type can be anything (For testing purposes, set it to "nothing") then change it later.

 

Set the "evaluation time" of the textfield that contains this variable to either "group", or "band". (band for testing purposes)

 

This should be it... Reply if not.

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...