开发者

Can jasper reports use filterable custom data sources

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 s开发者_开发百科ystem 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?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜