michael.hauck Posted August 31, 2017 Share Posted August 31, 2017 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 onHowever, 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 More sharing options...
mlopez_1 Posted September 1, 2017 Share Posted September 1, 2017 Try to define your own variable and set initial value to 1, increment type to Page and Reset type to report.I'm not sure this works but could be.Mariano Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now