- Pentaho 5.0 Reporting by Example
- Mariano García Mattío Dario R. Bernabeu
- 374字
- 2021-08-13 16:24:35
Time for action – configuring the Report Header and Details Header sections
In the ensuing steps, we will configure the Report Header and Details Header sections so that it looks as follows:
- In the Report Header section, we will add a label with the header text.
- To do this, we must drag-and-drop the insertable object
Label
(); this means that we need to drag it and release it in the work area that belongs to the Report Header section. Next, we will configure this label so it includes the text First Report: Hello World in bold face, centered, and large font size. - To do so, we will select the label we just added in the work area and configure its Attributes and Style properties.
- In the Attributes tab, as the value of the characteristic value, we enter
First Report: Hello World
. - In the Style tab, as the value of the bold characteristic, we enter
true
. - In the Style tab, as the value of the font-size characteristic, we enter
20
. - In the Style tab, as the value of the h-align characteristic, we enter
CENTER
.Note
From now on, to indicate that a certain value should be entered in a certain characteristic of Attributes or Style, we will use the following notations:
Attributes.value =
First Report: Hello World
Style.bold =
true
Style.font-size =
20
Style.h-align =
CENTER
- We will make the Details Header section visible in our report. The Details Header section is commonly used to place information of what you will see in Details.
- Go to the tab structure, and in the hierarchical tree, navigate to Master Report | Group: | Details Body | Details Header. Then set Attributes.hide-on-canvas to false as shown in the following screenshot:
- Place three labels in the work area of this section (by dragging-and-dropping) with the following text:
Location
Article
Qty of Sales
- Finally, configure the following characteristics:
- Style.font-size = 12
- Style.bold =
true4
. We insert a horizontal line () under the preceding labels and configure it in the following way: - Style.stroke =
solid, 4.0
- Style.text-color =
#009933
What just happened?
We customized the report's Report Header and added and configured a title. Also, in the Details Header section we added and configured three column headings and a horizontal line.