Contents   Index   Previous   Next



Inspector window

 

As usual, all properties of the element can be found in the inspector window:

 

 

Again, the Object name is the first item on the list and the Uneditable function is right below it.

 

Default cell border creates borders around each table cell. Set the border width and the color with click on the term Border.

 

Attention: Due to renderer limitations, the Default cell border applies only to table cells, which are filled after the function was activated. All previously filled cells will not display a cell border. So if you want to have a default border around all table cells, you need to set this property before you start filling the cells.

 

Usually a table is grouped to a node from the XML tree. The grouping is displayed in the field Grouping and can also be modified there. Depending on the settings you made in File-> Preferences->View options->Use simple grouping dialog in Inspector you can enter the path to the correct node manually or open the grouping window to select the correct node from the XML tree.

 

You can create a table with many alternating background colors for the table rows.

 

Note: To apply Alternate colors to table rows, it should have a grouping so that the specific row is printed several times according to the XML file.

 

Use the check box Use alternate colors and click on the editing field next to Alternate colors. A window opens:

 

 

By default, the two alternating row colors are set to white and grey, meaning that in a generated PDF one row will be colored in white and the other one in grey. The sort order is the order you specify here. To change the order, select one color bar and click "Up" or "Down".

 

To select more row colors for your table, click "Add". This will open the familiar color dialog where you select the color of your choice. The new color is placed below the existing colors.

 

Note: There may not be less than two colors specified.

 

To change an existing color, select the matching color bar and click "Change", which will also open the color dialog.

Confirm your settings with the button "OK" or abort with "Cancel".

 

Note: The dialog regarding the alternate table colors will only be available if you checked the check box Use advanced alternate colors wizard on the View options tab in File->Preferences.

 

Without the usage of the advanced alternate colors wizard you can specify only two colors. To change them click on Color1 or Color2 in the inspector window and specify the colors you need. It is possible that you will find more colors fields in the inspector. That means that more colors were specified using advanced alternate colors wizard before.

 

To sort the contents of the table, use the function Sort:

 

 

You can sort the table by a node, which is not necessarily currently a part of the table, but must be contained inside the exact node the table is grouped to, no subordinated nodes.

 

To add sorting press the "Add" button in the right top corner of the Sort properties window. After pressing the button, another Sort properties window opens:

 

 

In the field Attribute name you specify the node according to which you would like to sort.

 

Note: Please consider the table or row grouping because the attribute name should be written correctly according to this grouping.

 

In the select box Sort order you specify the Ascending and Descending order for your sorting:

 

 

In the Data type combo box you can choose Text, Numeric and QName but not NCName types of data:

 

 

Please note: It is possible to use the type "Text" for nodes, which contain only numbers, but it is not possible to use the type "Number" for nodes containing text or text and numbers.

 

In the select box Case order you specify Lower first and Upper first sorting modes:

 

 

Note: The case order choice will work only with the "Text" type.

 

After entering the sorting attribute it is displayed in the Sort properties window. There are two columns - in the first column there is the Attribute name, in the second column there is the Expression containing all the settings you have made here.

 

 

It is possible to enter more than one sorting mode:

 

 

If you need to Add, Delete or Edit a sorting mode, click the respective buttons in the right top corner of the Sort properties window after selecting the sorting mode.

 

Example: Using the Example.xml from ..\Tutorial\10_ExampleManual, the table with one row and two columns is grouped to the node Product and contains elements from that node.

 

 

Generated output would currently look like this:

 

 

This node also contains the nodes ProductNumber and Price, which are currently not part of the table. You can now sort the table contents by ProductNumber by entering that name into the field Attribute name in the sorting dialog. Click the button "Add" and enter the name of the node:

 

 

Select the Sort order Descending and specify whether the node you entered contains data of the Data type text or numeric. QName allows you to sort the table contents by a defined namespace inside the XML file (it can be an element name or an attribute name). If you like, you can also specify whether values in lower case or upper case should be displayed first.

 

 

The now generated output shows the products sorted by the product number in a descending order.

 

Tables can also be given background images and colors. With Background image you assign or remove a background image to the entire table. Fill color specifies a color for the table which can be set back to default with Back to default.

 

Note: The use of alternate colors will overwrite a background color or a background image.

 

If you use a header or a footer for a table in a multipage layout, and you do not want to see them in your table on every page of your document but the header only on the first page and the footer only on the last page; use the functions Omit header at page break or Omit footer at page break.

 

The select box Logical style shows a list of all styles, which have been defined for tables with the function Edit->Styles. Styles are described in the chapter Styles.

 

In Cell properties you make settings for a cell border, which applies to all new elements you add to the table from then on.

 

 

In Fill color you specify the background color, which the currently existing elements in your table will be given.

 

Attention: Fill color will overrule row colors or background images of the table.

 

If you want to give the cells a background image, select it in Background image.

 

You can select a style for the cells in the select box Logical style. Styles can be created in the menu item Edit->Styles.

 

The list box Row properties allows you to select rows and also opens more properties for rows:

 

 

Assign a fixed height to this row with the function Fixed row height. You can either drag the row to the height you want with the mouse and then activate this function or enter a value into the field Row height.

 

If you want to give the table row a background image, use the function Background image to select the desired image. The image can be removed via the context menu.

 

Give the table row a specified color with the function Fill color, if you don't want to use the Alternate color function for the entire table.

 

As well as grouping an entire table to a node, it is also possible to group single table rows to XML nodes. This allows you a broader control of the output of the table. Using the grouping function also offers you more sort options for the contents of the row.

 

Please note: It is not only possible to add groupings to table rows consecutively. The string "../" moves you one level higher from the current grouping level (two levels higher in the structure require the string twice and so on). The name of the next lower level and the slash move you one level lower.

 

We already explained the functions Keep with next and Keep with previous earlier. Using this function you specify that the selected row will not be separated from the next/previous row in a page break.

 

The Column properties offer the possibility to enter a value for the Column width. Of course it is also possible to determine the width by dragging the column to its desired size.

 

In the group Frame properties you will find the command Bounds, which shows element settings and functions for it.

 

Fix a text frame in a position by activating the check box Absolute placement. In this mode the table frame will appear in this position. If the check box is not activated, the table will be aligned to the next available empty top left position.

 

Note: The appearance of a fixed frame depends to a certain degree on the other elements on the sheet. If a fixed table frame is e.g. placed below another table with dynamic contents, the second frame will appear below the first table after it is finished (which may even take many pages).

 

When the frame is placed absolute, you can also determine the frame coordinates by entering values in the fields Left and Top. Enter the distance between the frame and the left rim of the sheet and between the frame and the top rim of the sheet.

 

Size the frame either by pulling it into the desired size or by entering values into the fields Width and Height.

 

Padding left, Padding right, Padding top and Padding bottom control the distance between content and frame. Enter the desired values.

 

With the command Border you decide whether the frame should have a border or not. A submenu opens:

 

 

By default, frames have no border. If you want to have a border around the entire frame, click the check box Border, enter the width and select the color by clicking on the colored space beside Border color. Default setting is 1pt width and the color black. If you only want to assign single color lines for the frame, you can assign all four sides individually. Apply your selection with the button "OK" or abort with the button "Cancel".

 

With the command Horizontal Alignment you determine whether the contents of the frame should be aligned to the Left, Center or Right. Vertical alignment aligns the frame content to the top, the center or the bottom of the frame; but these options are only available when the frame is in a table.

 

Again, the Level function helps you arranging overlapping elements on the sheet. A table element can certainly also be assigned to a specified level, like every other element.

 

You will only need the command Span if you work with several columns on your sheet. It makes a frame span all columns if you select "all" from the select box, or just one column if you select "none".

 

In the menu XSL-FO options you will find the commands Generate FO-Block with Custom attribute names and values (for properties which exceed the range that XSLfast provides), Use apply, Generate template, Page break before, Page break after, Space before, Space after and If-Builder (see chapter Text).

 

We explained these before in this manual. Please also see relevant technical XSL-FO and XSLT literature for details and further information.