blamblam Posted May 7, 2021 Share Posted May 7, 2021 Hi I'm trying to create a report for multiple users so I have a loop that goes through the List of users and creates a report based on their details. Inside the loop I have a JasperFillManager like this: def jrprint = JasperFillManager.fillReport(resource.get(), parameters, dataSource)[/code]where resource is the .jasper file, parameter contains the details of the users and dataSource is aa JRBeanCollectionDataSource. It creates the first report just fine but flags an error on the second loop:net.sf.jasperreports.engine.JRException: Error loading object from InputStream.[/code]I hope you can help me, thanks! Link to comment Share on other sites More sharing options...
Solution blamblam Posted May 10, 2021 Author Solution Share Posted May 10, 2021 I reused the inputstream in the loop, the pointer already moved to eof. Solution is to create a new one in every loop. 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