Pentaho Report Designer getting started tutorial (1), pentahodesigner

Source: Internet
Author: User

Pentaho Report Designer getting started tutorial (1), pentahodesigner

PentahoReport Designer getting started

Pentaho Report Designer5.1 is the latest version.

I. Installation and introduction

This section describes how to install jdk, configure java environment variables, download pentaho report, decompress the report, and run it directly.

Ii. Example 1

This example is an example in chapter 2 of Pentaho Reporting 3.5 for Java Developers, which is easy to use; 11 java libraries and their sizes are displayed in the report (the latest version 5.1 is no longer 11), and the number and size of java libraries are summarized. Create a new folder named chapter2 to store the created report file.

The report environment and basic content will not be introduced for the time being, and will be described in detail when used.

1. Create and configure data sources

First, we need to define a dataset for the report. To simplify the example, we use a table dataset. On the Right of the report designer, clickDataTab, right-click and selectTable. Click the plus icon to create a table dataset named libDs. By default, there are two columns. Click the Add column button, add a column, name it Library Size, and set the type to java. lang. integer. Click Add row to add table data. The data content is as follows.


The content is as follows:

Click OK. The data view on the right is as follows:

2. Report Layout

After the dataset is defined, we design the report, which includes the report title, column title, and obvious content. Finally, the report summary content.

2.1 create a report title

Drag from the left-side ToolbarLabelDouble-click the icon in the Report Header section and change its content to Pentaho Report EngineLibrary Repor. Change the font size to 16 PX. You can also modify the font in the format menu. Click the Label control, or you can drag to change the other size.

2.2 create a column title

Under the report title, add three labels as the Column Titles: Library Name, Library Description, and Library Size. Select Guides à Snap under the view menu to enable automatic capturing to make it easier to align the label to the grid. You can also double-click the ruler to add the ruler line, as shown in; drag the horizontal line on the left-side toolbar, add a horizontal line under the column title, and modify the Style of the horizontal line through the Style attribute under the structure tab on the right, mainly to modify the Style and width of the line by stock, the text-color attribute modifies the color of the line.

2.3 fill in the details section

The content of the detailed section is automatically filled based on the number of rows in the dataset. In this example, there are 11 rows of data, so the detailed section will automatically show the content of 11 rows again.

Drag the dataset field to the detailed section to adjust the size and alignment. You can press the shift key and select multiple controls through the mouse stroke range. You can set the alignment mode in a unified way and select the alignment Mode Under the Format menu.

2.4 Design Report Summary

Finally, create a Report Summary section, including the sum of the number of java libraries and the size of java libraries. We add a horizontal line at the top of the report footer segment, and then add two labels with the following content: Library Count and Total Library Size. You can select the control and press the arrow key (top, bottom, left, and right) for fine-tuning.

The number and total size of the created function compute library are as follows. Click the data tab on the right, right-click the function item of the Tree node, select Add Functions, select Count (Running category), modify the function name attribute, and name it Library Count. Add the function again, select Sum (Running), modify the function name attribute to Total Library Size, and modify the summary field to Library Size.

Drag the two functions to the report footer section and adjust the position.

2.5 preview and save the report

Click the preview button on the left of the toolbar on the canvas to preview the report. You can also preview the report by using the green triangle symbol in the File menu or toolbar to ensure that the design content is correctly displayed.

If you are satisfied with your design, save the report to prepare for subsequent integration and save it to chapter2/data/chapter2_1.prpt through the File menu.

The report file is saved in an open‑net format similar to OpenOffice. orgs. It is a zip compressed file consisting of a master xml file and some other resource files. The following sections integrate the report.

3. Integration in Swing programs

 

4. Integration in j2ee

 


Who are familiar with pentaho report designer? Familiar with QQ136795830

Hello, add 315268537
 
How does Pentaho Report Designer edit the name in structure?

Look for help documentation to make it faster

Related Article

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.