Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
----
{scrollbar}

----
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 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.

h3. 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.

h5. 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*
!EditorEstilos.png|vspace=10,hspace=10!
# Accept 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.

h5. 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.
!FormateandoEncabezados.png|vspace=10,hspace=10!

h5. 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.

h5. 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.
# AsignAssign this new style to elements Litres Sold and Net Sales in the detail row.

h5. EstiloStyle parafor losthe subtotalessubtotals.

# CreeCreate un nuevonew estilostyle llamadocalled Subtotal
# AjusteAdjust laalignment alineaciónto athe aright laand derechathe y el formato numériconumeric format similar alto delthe estiloValue Valorstyle.
# DefinaDefine una bordetop superiorand quebottom deborder lato ideasuggest detotalizing.
totalización
# AsigneAssign estethis nuevonew estilostyle ato lossubtotals subtotalesLitres desold Litrosand VendidosNet ySales.
Venta
Neta

h5. IndentaciónIndenting dethe ladetail filarow.
de
detalleFinally, we Porwill últimoadjust ajustaremosthe elwidth anchoof dethe lafirst primeracolumn columnaso parathat queit tengahas una tamañofixed fijo y dé la noción de indentación necesaria para identificar los vinos que corresponden a cada vendedor
# Seleccione la tabla
Esto muestra selectores para las filas y columnas alrededor de la tabla
# Seleccione la primera columna
# Especifique un ancho de 1 cm para dicha columna en el Editor de Propiedades

El reporte formateado debería verse más o menos así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.
!ReporteFormateado.png|vspace=10,hspace=10!

h3. Predefined EstilosStyles. 
predefinidos
The Existetool unincludes conjuntoa deset estilosof yapredefined predefinidosstyles conthat laenable herramientayou queto permitenformat formatearrelevant elementoselements famososin delthe reportereport. Tal
Such esis elthe casocase deof tablastables, filasrows, celdascells, etc. A continuación
seBelow, muestrayou elcan editorsee dethe estilosStyles dondeEditor, sewhere hathe seleccionadooption laPredefined opciónStyle dehas Estilobeen Predefinidoselected, lowhich enables cualus permiteto seleccionarselect elthe estilostyle queyou sewish deseato modificarmodify.  
!EstilosPredefinidos.png|vspace=10,hspace=10!

EnIn particular, lathe imagenimage muestrashows lathe selecciónselection delof estilo *report* questyle permitethat configurarallows elfor formatoconfiguration deof todoall elthe reportereport. 

----
{scrollbar}