Jump to content

Recommended Posts

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

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

I would suggest

create a jrxml with a subreport in it.

  • Main report should accept some arraylist as parameter
  • Group based on each arraylist value
  • in 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

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

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