In this section the necessary steps to make the report look better are detailed.
In particular we'll see how to:
- Align data cells
- Format numeric elements
- Format headers
- Adjust the selected font
Just like it was seen in the previous section, when selecting an element in the report, the Properties Editor shows the attributes related to the selected element thus allowing us to modify its behavior or presentation.
This lets us modify the format of each of the elements in the report independently, thus achieving great flexibility.
However, it is also possible to adjust the format of the report by defining styles that will let us control the properties of several similar elements simultaneously.
This tutorial explains how to format the report through the use of styles.
Defining Styles
In the report built so far the following elements can be identified:
- Titles in the table header.
- Salesperson's name in the Salespeople group header
- Name of the Wine in the detail row.
- Numeric values corresponding to the Litres sold and Net Sales in the detail row.
- Subtotals for the numeric values.
This classification suggests the need to count on different styles for each case.
Style for the Table Header
- Select the option New Style from the Element menu (Element -> New Style...)
This displays the styles editor. This editor can be invoked through other mechanisms, such as right clicking on the element to be given a new style. - Enter Header as the Style name (Custom Style)
- Select the group of attributes Text Block on the left
- Select a centered Text alignment
- Select the group of attributes Border
- Define the top and bottom borders as Solid with a width of 1 point
- Confirm changes to close the Style Editor.
Thus we have created the new Header style which could be assigned to any element in the report. - Select the label Wines_Wine (Vinos_Vino)from the table header
- In the Properties Editor, in the General group, select the recently created style.
The report will adjust to format the label according to the format of the style. - Asign the style to the Litres Sold and Net Sales labels.
Style for the Salespeople Group Header
- Create a new style called Group Header.
- Select the group of attributes Background and define y define RGB(240,240,240)as the background color.
- Asign this style to the label corresponding to the Salesperson's name (Vendedores_Vendedor)
So far the report should look something like the following image.
Merging Cells
The group header would look more attractive if it were spread over all the width of the report. This can be achieved by Merging Cells.
- Select the cell where the Salespeople_Salesperson label is (Vendedores_Vendedor)
Please note that in order to select the cell you must click on the available space between the division lines of the table and the edge of the label. In the Properties Editor, make sure that the cell, not the label, has been selected.
The title of that editor should read Properties Editor - Cell and not Properties Editor - Data - Select the remaining cells in the group header row while you keep the SHIFT key pressed.
The selection will enlarge to contain all the cells in such row. - Press the right mouse button and select the option Merge Cells
The cells in the group header row will merge so that there will be only one covering all the width of the table. The style with a background color makes this even more evident.
Style for detail numeric values
- Create a new style named Value.
- Select the properties group Text Block and define the right alignment
- Select the properties group Format Number
- Choose the predefined format Fixed with 2 decimal positions and activate the checkbox for the thousand separator.
- Assign this new style to elements Litres Sold and Net Sales in the detail row.
Style for the subtotals
- Create new style called Subtotal
- Adjust alignment to the right and the numeric format similar to the Value style.
- Define a top and bottom border to suggest totalizing.
- Assign this new style to subtotals Litres sold and Net Sales.
Indenting the detail row
Finally, we will adjust the width of the first column so that it has a fixed size and suggests the necessary indentation to identify the wines that correspond to each salesperson.
- Select the table
This shows selectors for the rows and columns around the table. - Select the first column
- Specify a width of 1 cm for that column in the Properties Editor.
The formatted report should look more or less like this.
Predefined Styles
The tool includes a set of predefined styles that enable you to format relevant elements in the report.
Such is the case of tables, rows, cells, etc
Below, you can see the Styles Editor, where the option Predefined Style has been selected, which enables us to select the style you wish to modify.
In particular, the image shows the selection of report style that allows for configuration of all the report.