matthew.kellar_1 Posted June 1, 2018 Share Posted June 1, 2018 I'm not 100% sure how to word this question, but basically what I'm trying to do is create a loop that can take a list of n number of items (in my case the parameters are barcode numbers) and pass those 1 by 1 as parameters to other reports in the Jasper Server, generating a PDF file for each one. For example, if I have 100 barcode numbers, I want to create 100 PDFs with a single REST call, and export them to a local folder. Is this possible? Link to comment Share on other sites More sharing options...
reportdev Posted June 1, 2018 Share Posted June 1, 2018 I would suggestcreate a jrxml with a subreport in it.Main report should accept some arraylist as parameterGroup based on each arraylist valuein the group bands, create a subreport (which is your actual pdf layout)when you make a rest call, send the parameter and generate multiple page pdf and then write some code to split multiple page pdf to single page pdf Link to comment Share on other sites More sharing options...
hozawa Posted June 3, 2018 Share Posted June 3, 2018 Simple answer, NO. A report is a single pdf file. If you want to generate multiple pdf files, you'll have to generate multiple reports. Link to comment Share on other sites More sharing options...
matthew.kellar Posted June 5, 2018 Share Posted June 5, 2018 Thank you for the responses. I ended up using a similar approach that reportdev suggested. Instead of using an ArrayList parameter, I just used a SQL query to find the parameter values I was looking for and passed those to a subreport in a report group to split them up. I couldn't get them all on separate PDFs though, they're all in one. 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