Developing Web Reports using Pentaho report

Source: Internet
Author: User

Developing Web Reports using Pentaho report

1. Document Description

Java Open source reporting software, Pentaho report is relatively good, to meet the majority of applications, and domestic business reports comparable; now record the actual Development Report complete process tutorial, let beginners quickly get started and apply to the project.

2. Development environment Description

1) Tool Environment: Pentaho report designer5.3, Tomcat6, Jdk6, Eclipse Java EE (4.3)

2) MySQL and sample database Saikla

3) MySQL driver copy to Report_home\lib\jdbc folder

4) Configure the report environment Jndi

Jndi is used in order to use the connection pool configuration when the Web project is integrated;

The. pentaho/simple-jndi/default.properties file adds Jndi configuration information; the. Pentaho directory is home or the user directory that runs the Report Designer program.

The sample configuration reads as follows:

Sakila/type=javax.sql.datasource

Sakila/driver=com.mysql.jdbc.drivers

Sakila/user=root

Sakila/password=a123

Sakila/url=jdbc:mysql://localhost:3306/sakila

3. Developing reports in the designer

After the completion of this tutorial report, showing such as:

3.1 Configuring database connections

Jndi names are the same as those previously configured; test cost, confirm save.

3.2 Defining a DataSet query

The SQL in the query section can be generated graphically or copied directly, and click Preview to verify that the statement is correct. Complete and right-click Query results are shown below:

3.3 Defining functions

Right-click New function on function node, sumamount, Countcustomer pageofpagesfun. Sumamount needs to indicate the sum field.

The summary is a global class, and the running class is run-time evaluated, depending on the grouping or segment.

3.4 Designing a report area segment

The details section is automatically scaled down according to the records, and the other segments are displayed only once or once for each grouping. If the segment is hidden in the designer, right-click in the structure diagram to unhide it.

Sets the grouping field and the control value, where the value of the message control is: $ (first_name), $ (last_name), and the other controls are dragged from the data set.

You can also set values or formulas for control properties, such as the following:


Developing Web Reports using Pentaho report

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.