JimmyRay Posted August 31, 2006 Share Posted August 31, 2006 Hi I use a compiled jasperreport accessing it through a file path and filling it with a JRDataSource using following code: jasperPrint = JasperFillManager.fillReport(filePath, parameters, this); Is this the correct way? However, the first time I fill the raport everything works fine, but when I try to fill the same report again I always get a jasperPrint with 0 pages. Is there a kind of caching inside the JasperFillManager which I need to set back?I'm absolutely sure that there should be at least one page. Furthermore I never get an exception. It's pretty strange. I got this behavior with jasperreports 1.1.1 and 1.2.5 Thanks for any help Link to comment Share on other sites More sharing options...
Code_Slave Posted August 31, 2006 Share Posted August 31, 2006 it depends if it is in the same session. if you have filled the report, then you try to fill it again, it will not work, because your datasource is exhausted. you need to reset your datasource back to the start , then re-fill the report. Exactly what are you trying to do? give an example. Link to comment Share on other sites More sharing options...
JimmyRay Posted August 31, 2006 Author Share Posted August 31, 2006 There is no example necessary. You got it! ;) I forgot the reset the index which is used inside the next() method after the filling process.However, thanks a lot. 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