Pentaho 简明教程

Pentaho - Navigation

本章将提供一个有关 Pentaho 中提供的用户界面的简要介绍,以及如何在其中导航。

This chapter will provide a brief introduction on the user interfaces available in Pentaho and how to navigate through them.

The Welcome Screen

欢迎界面提供了两种方法来创建不同类型的报表。这两个选项是 Report WizardNew Report

The welcome screen provides two ways to create reports of different types. Those two options are Report Wizard and New Report.

  1. Report Wizard − It provides an easy-to-use four steps process that walk you through creating a new Report.

  2. New Report − If you choose this option, then you can create customized reports based on your requirement.

Pentaho 有一组示例报表,可帮助您了解如何使用某个特定报表设计器。以下屏幕截图显示了 Pentaho 的欢迎页面。

Pentaho has a set of sample reports to help you figure out how to use a certain Report Designer. The following screenshot shows the welcome page of Pentaho.

welcome page

The Main Toolbar

主工具栏位于窗口的顶部。请查看以下屏幕截图——最大化框是主工具栏。它包含执行以下操作的按钮——新建文件、打开文件、保存文件、发布报表、添加数据源、运行报表、选择对象、撤销、重做、剪切元素、复制元素、粘贴元素、删除选定的元素和切换字段选择器面板。

The main toolbar is at the top of the window. Take a look at the following screenshot – the maximized box is the main tollbar. It contains button to carry out the following actions − New File, Open File, Save File, Publish the Report, Add Data Source, Run the Report, Select Object, Undo, Redo, Cut Element, Copy Element, Paste Element, Delete Selected Element, and Toggle the Field-Selector Palette.

main toolbar

The Report Workspace

工作区是我们可以设计报表的中央工作区域。请查看以下屏幕截图——中间的白色区域是工作区。它分为五个区域——页眉、报表页眉、详细信息、报表页脚和页脚。

The workspace is the main working area where we can design the reports. Take a look at the following screenshot – the white area at the center is the workspace. It is divided into five bands − Page Header, Report Header, Details, Report Footer, and Page Footer.

  1. Page Header − You can use any type of data here that is suitable to print on top of every report page. It does not allow any dynamic values or page breaks.

  2. Report Header − The second band from top is the Report Header. It contains the report elements. It appears once per report, that is on the first page of the report.

  3. Details − The Details band is the largest portion of your page because most of the report data is presented in this area.

  4. Report Footer − Just like the Report Header, the Report Footer appears just once per report, that is on the last page of the report.

  5. Page Footer − The last band is the Page Footer which appears at the absolute bottom of every page in the report.

您还可以为各种报表元素创建组。每个组在工作区内都有自己的页眉和页脚区域。

You can also create groups for various report elements. Each group has its own Header and Footer bands in the workspace.

pentaho workspace

The Structure Pane

结构选项卡与报表设计器右上角区域中的数据选项卡共用一个窗格。请查看以下屏幕截图;它显示了报表工作区中包含的每个元素的确切层次结构。

The structure tab shares a pane with the Data tab in the upper right section of the Report Designer. Take a look at the following screenshot; it shows the exact hierarchy of every element included in a report workspace.

structure pane

The Data Pane

数据窗格使您能够添加数据源并查看每份报表中的各个查询、函数和参数。窗格顶部的三个按钮分别用于添加新的数据源、函数和参数。

The Data Pane enables you to add data sources and view individual queries, functions, and parameters in each report. The three buttons at the top of the pane are meant for adding new data sources, functions, and parameters, respectively.

  1. Datasources − All the data sources and queries that you have defined for the current report will be listed here. If you want to add a new data source, then rightclick on the leftmost button (the yello cylinder) click add.

  2. Functions − All the functions (mathematical and conditional) elements that you added to a report will be listed in this category. You can add a function by clicking the (fx) button.

  3. Parameters − You can add a parameter to your report, which will enable the report readers to customize the content of the output.

请查看以下屏幕截图。

Take a look at the following screenshot.

data pane

The Style Pane

样式窗格显示结构窗格中任何给定项目的所有可视和位置样式选项。单击任何结构元素,样式窗格的组成将调整为显示按组列出的所有可用样式属性。仔细查看以下屏幕截图。

The style pane displays all the visual and positional style options for any given item in the structure pane. Click any structure element, and the composition of the Style Pane will be adjusted to show all the available style properties listed by group. Take a look at the following screenshot.

style pane

The Attribute Pane

属性窗格显示结构窗格中任何给定项目的低级属性的所有输入和输出选项。

The Attribute Pane displays all the low-level properties, and input and output options for any given item in the Structure Pane.

attribute pane

The Palette

调色板包含用于生成报表的所有元素。要添加元素,单击布局带以选择它,然后从调色板拖放一个元素到选定的带中。我们在下表中解释了每个报表元素的作用。

The palette contains all the elements that you can use to build a report. To add an element, click on a layout band to select it, then drag and drop an element from the palette to the selected band. We have explained the role of each of the report elements in the following table.

Element icon

Element name

Description

Label

A static text string. It cannot change dynamically.

Text-Field

A Textual report element and changed dynamically based on the query.

Number-Field

Displays dynamic numerical data from a query.

Date-Field

Handles date information form a query.

Message

An element that combines multiple static and dynamic report elements.

Resource-label

Static text string that maps to a resource bundle

Resource-Field

Dynamic text string that maps to a resource bundle, allowing you to localize any database field.

Resource - Message

Dynamic text string that concatenates data from multiple types, and dynamically maps to a resource bundle.

Image-Field

A reference to an image stored in a database.

Image

A static image embedded into a report.

Ellipse

A vector graphical element in the shape of eclipse.

Rectangle

A vector graphical element in the shape of rectangle.

Horizontal-Line

A vector graphical line, drawn horizontally.

Vertical-Line

A vector graphical line, drawn vertically.

Survey-Scale

A simple sliding scale chart element.

Chart

A chart or graph that shows your query results graphically.

Simple-Barcodes

A barcode chart element.

Bar-Sparkline

A Bar Sparkline chart element.

Line-Sparkline

A line Sparkline chart element.

Pie-Sparkline

A Pie Sparkline chart element.

Band

A method of grouping elements.

Sub-Report

An element that references another report.

Table-Of-Content

A table of content report element.

Index

An Index report element.

看看下面的截图;左侧的高亮框是报表元素的调色板。

Take a look at the following screenshot; the highlighted box on the left side is the palette of reporting elements.

pentaho palette