Java Reporting Tools

Source: Internet
Author: User

1. Basic functions of reporting tools

Reporting tools typically provide functionality:

    1. Multiple data sources are supported, and data sources can be configured.
    2. Script-based style definitions, typically XML-enabled, can be modified flexibly and typically provide a style editor. Generally support the definition of print-based style, support the concept of report head, tail page, group and so on.
    3. The data source and style definitions, entered into the report engine, can be exported to multiple formats, including PDFs, Excel, and so on.
2. Use of reporting tools

From the basic function of the report tool, using the Report tool, the core is two, one is the definition of the data source, and the other is the definition of the style.

The definition of the data source is relatively simple, generally the database, according to the requirements of the report tool configuration connection pool, according to business needs to write SQL.

Style definitions generally rely on the designer, first, familiar with the designer page settings related functions, and then familiar with the relevant components.

The reporting engine may need to build additional servers or stand-alone web apps that can be deployed as required, taking into account resource loads and single points of failure.

3. Using report tools in projects

Use the report tools in your project to split design time and run time.

3.1. Design time

At design time, use the Visual Report design tool to "draw" the report and bind the data source.

Gets the report style file, which is typically in XML format.
To improve the efficiency of report execution, the report style file may be a compiled binary format.

3.2. Operation time

At run time, publish the report style file to the app. Run and get the results.

Reporting tools need to be encapsulated to meet the "open and close" principle, which is to keep Java code stable and not modify Java code because of new reporting requirements or changes in business requirements.

The encapsulated report module, which includes data sources, style definitions, parameters, data sources, and style definitions are determined at design time, and the data obtained from the data source differs depending on the parameters.

Therefore, the report module can be accessed as follows:
Http://myapp/report/?ds=ds1&rpt=rpt1&ext=html&params=blablabla

You can make the following conventions: Each report has a name, and the data source and style file all use that name.

The report module can then be accessed in the following ways:

Http://myapp/report/?name=rpt1&ext=pdf&params=blablabla

Data sources and report styles are best separated, can be modified separately, many times to modify SQL, especially when the report style files need to compile the situation.
In a report data source, if the core is just an SQL statement, it can be stored in a file, in a database, or in a cache.

4, Jasperreport

Jasperreport is a free, more typical reporting tool. Official website: http://sourceforge.net/projects/ireport/.

Download page:
Http://sourceforge.net/projects/ireport/files/latest/download.

ireport is the style designer for Jasperreport.
The detailed graphic tutorials are as follows:
[ireport Designer] (http://download.csdn.net/detail/stationxp/8738859
)

Other documents:

CH1 Overview
Http://wenku.baidu.com/view/5af1894e852458fb770b5620.html
CH2 Environment
Http://wenku.baidu.com/view/7136bb40a8956bec0975e3d7.html
Getting Started with CH3 reports
Http://wenku.baidu.com/view/5e8d11976bec0975f465e2d7.html
CH4 database
Http://wenku.baidu.com/view/3523b077f46527d3240ce0d7.html
CH5 Other data sources
Http://wenku.baidu.com/view/94aa9ed1240c844769eaeed7.html

Problems
Http://wenku.baidu.com/view/6bd50288680203d8ce2f2436.html

PDF Viewer: Evince.

Java Reporting Tools

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.