Mint 2 Data Reports

Mint2 now supports a data reporting system.

The implementation is based on the Jasper Reports library.

The Report Layout is described by a Java object in our case already compiled into a .jasper file that resides into to the Mint instance runtime path.

These .jasper file have been compiled into binary from an XML file describing the report layout. Designing .jrxml (Jasper Reports XML) report files and compiling into the .jasper objects can be done with the use of an almost WYSIWYG editor like iReport .

Jasper Reports library uses multiple sources as its input. Our implementation uses custom Java beans as an input.

iReport can read the fields of the report input Java Beans through a .jar exported from Eclipse and placed inside iReport’s path.

The .jrxml files although not used at runtime ,in our reports are placed inside the project directory /report_templates. Editing can be made with iReport and the resulting compiled .jasper should be put in the WEB-INF/src/java/gr/ntua/ivml/mint/report.

Retrieval of the data is made through the UrlApi of Mint2 .This allows the reporting system to be ported and run independently by an application, such as a central reporting system, monitoring multiple Mint2 project instances.

At runtime Java beans are constructed after parsing the UrlApi JSON responses corresponding to our requests.

After the JSON is parsed custom Java beans are created and added into Java Collections by classes called factories.

The Collections (Lists) are input into the Jasper Report manager (net.sf.jasperreports.engine.JasperFillManager ) along with the specific .jasper file and some optional parameters .

Output can be in various formats with the use of various libraries. For .xlsx or .csv types the report has to be designed in a minimal way without using much graphics or vertical spaces.

Our report system is implemented into the DownloadReport action. And all the classes describing the Java Beans and the factories are placed into the : WEB-INF/src/java/gr/ntua/ivml/mint/report/