Hello all, This is the first time I am using iReports and I am still in the middle of learning. Under report query, I try to select * from get_measurements(3); This will return 3 fields, namely _type(String), _value(Double) and _unit(String) There will be > 5 millions of rows out of this database. Our customers are much more interest to get a summary out of this, for example (min, max, average, std. dev., ...) Previously, before using JasperReport, we are writting our own application code (C++, Python...), to process the raw data, calculate their average, max, min..., and show the result. We do not have database to store the summary result at current moment. We plan to use JasperReport, so that our customers can have the flexibility to design the report format they wish. We have 0 idea, how we can integrate exsting "generate summary out from raw data" code, into JasperReport. We realize when we drag n drop Fields from Report Inspector to Designer, there will be a dialog box to prompt us "The field value", or "The result of an aggregation function". However, this feature is rather primitive. We would like to perform calculation, based on _type. Hence, we do need to write our own code. Does JasperReport has their own way, where we can write "stored procedures" to generate summary out from raw data, within JasperReport itself? Thanks.