Jump to content

subreports parameter question


sloin

Recommended Posts

Am I doing it right, when I get 5 reports I have already created and put them into one master report. Where dataSourceExpression tag contains a $P{parameter} with JRDataSource (the same as I used for the previous individual report) and subreportExpression contains a path to the report file.

The problem is, that it always renders only the first subreport. It seems that next() getField() mechanism doesn't work properly as it would when the report was render separately.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You can't reuse a JRDataSource unless you rewind it first (a JR data source is like a java.util.Iterator).  So you'll have to either use a fresh data source for each subreport instance or find a way to rewind the data source (in the scriptlet or using the auto rewindable wrapper described at http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=20804).

HTH,

Lucian

Link to comment
Share on other sites

  • 3 years later...

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