brcg.it Posted June 27, 2019 Share Posted June 27, 2019 (Using Jaspersoft Studio 6.6.0, no Jasper Server yet) My dataset looks like thisid|question1|question2|question31 |answer1.1|answer1.2|answer1.38 |answer8.1|answer8.2|answer8.3The report is designed to show one row per pagePage 1:<------- Header--------><--------ID:1---------->Question 1:[answer1.1]Question 2:[answer1.2]Question 3:[answer1.3]<-------Footer------->Page 2:<------- Header--------><--------ID:8---------->Question 1:[answer8.1]Question 2:[answer8.2]Question 3:[answer8.3]<-------Footer------->If i generate the report as PDF, i get one PDF with as many pages as there are rows.But what i need would be to have as many seperate PDF files as there are rows. Is this possible? Link to comment Share on other sites More sharing options...
C-Box Posted June 28, 2019 Share Posted June 28, 2019 I guess you will have to use JasperReports API for that after generating the filled report (JRPrint-Object).So the JRExporter has an flag just to export certain pages. So you could read the size of the generated JasperPrintPages and call the JRExporter for each generated JasperPrintPage separately with the current PAGE_INDEX for each single page.But keep in mind, that for example some streching content could also cause to generate multiple pages even for just one single database record.... so not sure if your report really generates just one page per row/record.. it depend's at your data & report design of course!hth + regardsC-Box Link to comment Share on other sites More sharing options...
szaharia Posted June 28, 2019 Share Posted June 28, 2019 This PAGE_INDEX parameter can be used with JasperReports API directly, as C-Box said.If you are using Jaspersoft Studio, you could set this parameter by clicking on Report Parameters icon in the Parameters section of the Preview area (see attachment image) 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