Pentaho 简明教程

Pentaho - Reporting Elements

大多数报表元素都可以通过从数据窗格拖放它们到工作空间上的任何一个分段(大多数是详细信息分段)轻松添加。

Most reporting elements can easily be added by dragging and dropping them from the Data pane to any of the bands on the workspace (mostly Details band).

让我们继续上一个章节中的相同示例。我们在其中向报表设计器添加了一个数据源和一个查询。在此,我们将基于查询产生的输出设计报表。

Let us continue with the same example taken from the previous chapter. There we have added a data source and a query to the Reporting Designer. Here we will design the report based on the output produced by the query.

产生的查询字段是报表元素,它们在以下屏幕截图中突出显示。它们是 − idnamedesignationdepartmentage

The resultant query fields are the reporting elements which are highlighted in the following screenshot. Those are − id, name, designation, department, and age.

Adding Reporting Elements

将查询添加到报告设计器后,产生的字段将出现在数据窗格中,如下截图所示。

After adding the query to the Reporting designer, the resultant fields appear in the data pane, as shown in the following screenshot.

employee table1

现在,将必需字段(想要在报表中显示的字段)从 Structure Pane(结构面板)拖动到主工作区中心的 Details Band(详细信息带)。

Now, drag the required fields (fields you want to display in the report) from the Structure Pane into the Details Band at the center of the main workspace.

查看以下屏幕截图。它显示了从结构面板中拖动年龄字段的方向。

Take a look at the following screenshot. It shows the direction to drag the age field from the structure pane.

report fields 1

在 Details band(详细信息带)中排列好所有字段后,可以通过单击视图按钮(在上图中以 “ 1 ” 标明)查看报表视图。

After arranging all the fields in the Details band, you can see the report view by clicking the view button which is pointed as “1” in the above screenshot.

单击视图按钮后,结果报表将如下图所示。在工作区中,您将找到所有字段的值(这些字段在详细信息选项卡中指定)。

After clicking the view button, the result report will be as shown in the following screenshot. In the workspace, you will find the values of all the fields (which are specified in the Details tab).

report result

现在,如果您想返回到设计模式,请单击下图中标为 “ 1 ” 的设计符号。

Now, if you want to go back to the design mode, then click the Design symbol marked as “1” in the following screenshot.

back to edit