碧玉报表可以使用可过滤的自定义数据源吗 [英] Can jasper reports use filterable custom data sources

查看:66
本文介绍了碧玉报表可以使用可过滤的自定义数据源吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑使用Jasper Reports处理大型数据库(数十GB数据)的报告,但是我的数据使用

I'm looking at using Jasper Reports to handle reporting for a large database (tens of gigabytes of data), but my data uses an EAV format. As far as I can tell, this means I'd need to use a custom data model, as a Java class implementing JRDataSource. The amount of data I'm dealing with, however, means that simply implementing the interface would force the report to fetch and filter far too much data. I'd need to push the filtering duties to the database system to get any practical speed, but I can't see any way for the custom data source to get the filtering parameters from the report. Is it possible with Jasper Reports? Are there any examples or tutorials for this sort of scenario?

为澄清起见,我想做这种事情:假设我想要一份有关特定日期每个属性最大值的报告.我可以设置一个数据源,将一个通用的日期过滤器添加到它的SQL查询中,但是如何告诉数据源它需要使用的特定日期呢?

To clarify, I want to do this sort of thing: Say I have wanted a report on the maximum values for each attribute on a specific day. I can set up a data source that adds a generic date filter to its SQL query, but how do I tell the data source the specific date it needs to use?

推荐答案

您确实需要实现

You really need to implement the JRQueryExecuter interface as well. Implementations of the interface are responsible for converting the query into a JRDataSource.

这篇关于碧玉报表可以使用可过滤的自定义数据源吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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