Jump to content
JasperReports Library 7.0 is now available ×

Passing values main and sub-reports


Recommended Posts


I’m having issues with the following use case: I have a report which incorporates several subreports. In the main report a counter is being initiated that needs to continue in the subreports; passing along values between the main and the different subreports. For example:

In the main report I have a counter with value 2 this value is being passed to the first subreport. There the counting starts from 2 and 5 gets added. So the new value is 7. This value is passed to the main report using a return value. The next subreport start immediately after the first. The value 7 is being passed to this second subreport via a parameter. This counts on with a new total of 12. This new total is being passed to the main report and used further in the main report.

In this example it is important to take into account that the value is not printed between the different subreports.

Is this possible? Can someone explain to me in more detail how to achieve this?

Kind regards,


Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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