Tables in Designer: 2 different types and lots of possibilities

image for tables

You can use tables in Designer in many different ways. They can be the frame with visible borders for facts and figures or have invisible borders and are used to keep all sorts of elements at the desired positions.

Static tables are finished in Designer and have a predefined number of rows. Dynamic tables are dynamically filled with data so that their number of rows depends on the data provided. So the first decision is whether you need a static or a dynamic table. Two simple questions with clear answers will help you:

  • Does the table have a fixed number of rows, e.g. in a legend with 4 abbreviations and their explanations? If so, create a static table.
  • Does the table have a dynamic number of rows, depending on data delivered, e.g. for an invoice having one or more articles depending on the order? If so, switch to codeview and create a dynamic table. The best way is to create it in a segment which will later on be included in the template.

In this post we will show you the basic possibilities to create a static table and important aspects for dynamic tables. Overall formatting options for tables will follow in a checklist.

3 options to create a static table

Especially for beginners, but maybe also as a good repetion for experienced users, we will show you the 3 different possibilities to create a static table.

Option 1: Quick definition of structure followed by detailed formatting

Press the button in the editor bar, mark the desired size by dragging the mouse and click on the bottom cell on the right side.

This will create an empty table with standard formattings and the desired number of cells. It covers the entire width of the document.

create table quick option

Option 2: Open the properties screen from the icon bar

Press the button in the editor bar and select “More…” down in the screen. This will open the properties screen where you can insert or change the desired number of rows and columns, if the default values of 3 rows and 2 columns do not fit your needs.

create static table option2

Option 3: Open the properties screen from the menu

Open the “Insert” menu in the menu bar, select “Tables” and in there “Insert table”. This opens the tables properties screen as described in option 2.

As long as the document or the segment is opened in preview mode, only one of the two second level menu entries is enabled. The disabled menu item will create a dynamic table – provided the template or segment is opened in codeview mode.

You can open the tables properties screen later on at any time from the context menu and the last-but-one entry “Table Properties”. This screen is also available for dynamic tables and the only possibility to format fonts. Table borders can be defined in the properties screens for both kinds of tables.

Important notes for dynamic tables

There are some important aspects during the creation of dynamic tables you have to know and may tend to forget if you are only creating dynamic tables from time to time. To help you we will refresh this knowledge here:

Switch to codeview layout

In preview layout you cannot find the menu entry and access possibilities to the entire table and cell content. So switch to codeview layout to get access to these options.

How many dynamic rows are needed?

You have to fill this field on the second page of the screen. It defines the number of dynamic rows of one position and is determined by data used.

On the left side you can see an example with 5 dynamic rows per position – with changing background colors for every position. There are 4 different production sites (Anlage) with different cost for electricity (Verbrauch).

On the right side you first see a dynamic table with one dynamic row and below an empty dynamic table which can be filled with 5 placeholders per position as you would need for the example on the left side.

dynamische tabelle mit je 5 dynamischen Zeilen pro Position
dynamische Tabellen mit 1 und 5 dynamischen Zeilen

Which one is the iteration node?

In your xml structure it is the first occurence of the node which comes several times. Its content shall be read repeatedly and written to the table.

Which value shall be entered as XPath?

Here you have to delete the part of the path you already selected as iteration node. 

The example shows the path
/documents/document/VBDPL/item[1]/VBDPL-POSNR in the XPath-screen. The path up to and including “item” was already defined in the previous step, so it is known.
You can thus delete the entire path including the last /, so that only the name of the node remains, here VBDPL-POSNR.

dynamische Tabelle Pfad XPath

Formatting the entire table

We will now describe basic formatting of the entire table. There are some differences between static and dynamic tables, so we will present both in comparison. 

Just follow the questions of the checklist in order to find helpful answers.

Do you want to set the width of the table and/or the single columns individually?
static table dynamic table

The width of the entire table and of the single columns can be changed in the table properties screen. After changes calculations will run in the background so that the sum of the individual column widths equals the total width. Additionally the remaining width is displayed with a green background if there is space left or a red background if the table is larger than the template.

You can also change the column width with the mouse if you move it over the column borders. Changing the width in the screen nevertheless is the most reliable way. 

You can set the values during creation of the table in the properties screen for dynamic tables. Here too, calculations are running in the background and the total available width is assigned to all columns equally, whereas changes in column width changes the total width of the table. A change of the total width re-creates columns with equal width.
How many columns shall the table have?
static table dynamic table
The number of columns will be defined upon creation of the table. After saving it you can no longer change it in the properties screen. You can insert new columns in the context menu before or after the selected column. The values can be defined in the properties screen of the dynamic table. If you change the number of columns you have to click in one of the column fields to see the changes.
After saving a dynamic table you can insert columns using the context menu.
How many lines respectively dynamic lines shall the table have?
static table dynamic table
The number of lines is set in the properties screen upon creation of the table or during quick creation (option 1 as described above). Later on, new lines can be added above or below the current line using the context menu.
If the cursor stands in the last cell you can create a new line using the tab key, too.
The number of dynamic lines must be defined during the creation of the table and cannot be changed later on. 
After saving, you can add new lines using the context menu.
Do you want a line height other than standard?
static table dynamic table
If a line shall not have the standard height of 120%, you can set a higher or lower value in the cell properties screen. You can either select a value from the list in the field “line height”. If none of the values fits your needs, you can enter the css-command in the field “cell style” line-height: x%;  and set the desired value instead of the x.
If you are changing this setting for one cell of a line, formatting will of course be valid for the enitre line.
Here the same proceeding as for static tables is valid.
Shall the table have headers?
static table dynamic table
If your table shall have headers, you have to select the checkbox “headers” in the tables properties screen. After this the fields for font formatting will be enabled and can be filled with the values you need. If your table shall have headers you have to mark the corresponding checkbox on the second page of the properties screen for dynamic tables. 
If you did not opt for headers in the dynamics table screen it is of no use to check the headers checkbox in the static tables properties screen.
Font formatting can later be done in the static tables screen. 
In dynamic tables, a header may be composed of several lines. Dynamic tables can also have sub headers which will dynamically be inserted between the blocks from data.
Shall the table have a footer?
static table dynamic table
For footers there is also a checkbox in the tables properties screen. The function is the same as for headers. Here the same applies as for headers.
Shall the table have margins to all four sides?
static table dynamic table
If the entire table shall have a margin on all sides, you can enter the desired value in the field “Margin” in the table properties screen. The functionality is the same for static and dynamic tables.
Shall the content have a defined padding to the cell borders?
static table dynamic table
If the content of a cell shall neither stick to the left nor to the upper border of a cell but have  paddings, you can enter the desired value in the table properties screen in the field “Cell padding”.  It will define the padding to the top and on the left side. The padding to the bottom and to the right will be defined by the space left. The functionality is the same for static and dynamic tables.

These are the basics. Other checklists with useful hints will follow.

image for tables
Cookie Consent with Real Cookie Banner