处理Jasper报告中的大量数据 - 开始 [英] Handle Huge Data in Jasper Reports - pagining

查看:127
本文介绍了处理Jasper报告中的大量数据 - 开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在创建PDF时处理大量数据,我知道在Jasper Reports中有一个名为Virtualizers的东西,但我不知道如何处理从DAO检索数据时触发的内存不足异常,我不知道如何在Jasper报告数据源中实现分页。

I want to handle huge data in creating PDF, I know there is a thing called Virtualizers in Jasper Reports, but i don't know how to handle the out of memory exception that is fired when i retrieve the data from the DAOs, I don't know how to implement pagination in Jasper reports datasources.

推荐答案

您需要自定义JRDatasource和Virtualizer的实现,你的JRDatasource实现应该以块的形式加载数据

You need a custom implementation of JRDatasource and a Virtualizer, Your implementation of JRDatasource should load data in chunks

你也可以在jasperreports.properties中设置net.sf.jasperreports.jdbc.fetch.size,如果你使用的是JRResultSetDataSource

You can set net.sf.jasperreports.jdbc.fetch.size in jasperreports.properties too, if you are using JRResultSetDataSource

这篇关于处理Jasper报告中的大量数据 - 开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆