Jump to content
Changes to the Jaspersoft community edition download ×

Page number in Subreports not resetted


michael.hauck

Recommended Posts

Hi,

I have the following problem:

I have a master report that contains a subreport in the detail band, nothing else:

<?xml version="1.0" encoding="UTF-8"?>																								((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("data.xyz")				$P{subreport_parameter_1}						[/code]

And a subreport, which contains the complete data to display. xyz is a json list, and each entry is used to render a subreport instance. The subreport template also contains page information:

...																					$V{PAGE_NUMBER}																		$V{PAGE_NUMBER}						[/code]

The evaluation time of the page number is textfield is set to now and report, respectively. What I want to achieve, is that each subreport has its page count resetted and the total pages of each subreport is used for display,

i.e.

subreport 1:    page 1/3    page 2/3    page 3/3subreport 2:    page 1/2    page 2/2subreport 3:    page 1/4    ... and so on

However, in the final generated report, the page numbers look like this:

subreport 1:    page 1/320    page 2/320    page 3/320subreport 2:    page 4/320    page 5/320subreport 3:    page 6/320    ... and so on (total report has 320 pages)

What do I have to change to achieve the behaviour above, so that each iteration of the subreport has its own page numbering, as if it was generated as a single report? Thank you very much for helping!

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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