开发者

java question on creating small reports

I need to do a really simple tool that prints reports.

To emphasize I want to be as simple and create it as easier as possible.

I have never looked into reports up today, and would like to ask on an advice on what libraries to use.

The tool will be really simple, i.e. a swing app that a user puts data in a JTable and saves the data.

My thought is to save the data in XML file.

What would be the best way to create a report of the data? I am planning to use multiple of these xml files to create the report.

This is just a first thought so, any design advice/guidance is also welcome

UPDATE:

A user from his machine inputs data e.g.

|Date| Name| Job |Description| Result| Reason|Cost| Current Status

In a jtable and gives many rows of this kind. Submits to a central PC and this info is is saved in an XML file as a single XML element.

This file can have many of these elements from 1 or N users. Note that the input is small, and the file will be small. I.e. no high requirements From this file I would like to get a re开发者_StackOverflow中文版port analytically, after some processing on the data, on a description of all these entries and sums on cost.

My only intent is to provide a nice summary in a format easy to understand/view.


You should have a look to the Birt project


JTable provides a full implementation of printing for its contents, as discussed in Printing Support in Swing Components.


...And the winner is iReport!!


There are different Java libraries available for generating reports. The important question is, what format are you expecting the reports in ?

Jasper, which we have used extensively in our project, does a lot of cool stuff.

If you want excel, apache poi is effective.

iText does pdf generation.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜