noelopezmiguez Posted March 7, 2016 Posted March 7, 2016 Hello!I have a problem and maybe someone can help me to solve it :)I am getting a memory error when generating a report with jasper report (it is an excel) because the query I am launching is too hard so my question is, ¿can I do something to get the results like "paginated" instead of keep all of them in memory? Maybe something like this ¿? http://www.javalobby.org/articles/hibernatequery103/?source=archivesThanks in advance!
hozawa Posted March 7, 2016 Posted March 7, 2016 JasperReports supports Virtualizer to support large reports.http://community.jaspersoft.com/wiki/virtualizers-jasperreports
noelopezmiguez Posted March 8, 2016 Author Posted March 8, 2016 Thanks for the answer.We are already using the JRSwapFileVirtualizer but our problem starts before that, when our query gets the list with all the results and we send them to Jasper, we need to find a way to split that results in smaller parts to do not get an out of memory error.
hozawa Posted March 8, 2016 Posted March 8, 2016 Why not just create paramters to pass to your sql statement to limit records to fetch. For example. there's a limit and offset in mysql select statement, Just set values for these values from parameters.
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