Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Create Tables
Within any RTF document, you can present information using simple tables with any number of rows and columns. In an RTF report template, it is also possible to render a model section as a table, defined with any number of columns but with only two rows. You can either add your own text to the tables, or populate the table cells with fields that extract information from your model.
Access Select Table from the menu bar at the top of the Document Editor window, or right-click and select the Table option within either:
- The Content panel of the Document Template Designer or
- The text area of the document
Create and format a table
To |
Action |
See also |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Insert a table in the document |
Position the cursor on the point in the text to create the table, and select the Table | Insert Table menu option. The New Table Parameters dialog displays, in which you specify the number of table rows and columns. For a model section table in a report template you can accept the default values of two rows and three columns. Click on the OK button. Your table might be invisible; if so, select the Table | Show Gridlines menu option to reveal the table and cell borders in dotted lines. These lines are for guidance in creating the document, and do not display on the printed document. You can add printable borders if you wish, using other context menu options (below). The editor initially creates a table with cells of equal width across the page; you can change the cell width by dragging the cell borders using the mouse, or using other context menu options (below).
|
|
||||||||||||
Add a header row |
Select the top row of the table, and then select the Table | Header Row menu option. Apply any heading text, settings and formatting to the highlighted row. In the document or compiled report, the heading row is repeated at the top of the columns each time the table flows on to a new page. In a report, if the heading row is populated with the values from field names, the heading rows on subsequent pages reflect the values from that first row. This option operates on the single row at the top of the table, and not on multiple rows. If you edit the table and add a row to the top of the table to act as a new header, selecting the menu option on the new row clears the previous setting.
|
|
||||||||||||
Insert a new row above the current row
|
Click on a row and then select the Table | Insert Row menu option. |
|
||||||||||||
Insert a new column to the left of the current column
|
Click on a column and then select the Table | Insert Column menu option. |
|
||||||||||||
Merge cells |
Highlight the cells to merge and select the Table | Merge Cells menu option. The width and/or height of the resulting cell is the sum of the widths and/or the sum of the heights of the merged cells. You can merge cells across a row, down a column, and in a block spanning both rows and columns.
|
|
||||||||||||
Select a column |
Click on a cell and select the Table | Select Current Column menu option. The whole column is highlighted and selected for further formatting.
|
|
||||||||||||
Split a cell |
Select the cell to split and select the:
Any text in the original cell is assigned to the first cell, and the second cell is created empty.
|
|
||||||||||||
Delete cells |
Select the cells to delete and select the Table | Delete Cells menu option. The Delete Table Cells dialog displays, on which you specify whether to delete:
If you delete all cells in a table, the table itself is automatically deleted.
|
|
||||||||||||
Position the table on the page |
Click on any part of the table and select the Table | Row Position menu option. The Table Row Alignment dialog displays, on which you select a radio button to left-justify, center or right-justify the table on the page. Leave the All Rows in the Table checkbox selected. This menu option has greater effect if the table is narrower than the page or text column.
|
|
||||||||||||
Set the height of a row, or all rows |
Highlight the rows to adjust and select the Table | Row Height menu option. The Row Height Parameters dialog displays; you can select to:
If you are setting the height, type the value in twips. You can apply the setting to the selected rows only, or select the Apply to all rows in the current table checkbox to set the height of all rows in the table.
|
|
||||||||||||
Keep row text together if it continues over a page |
Select the rows to protect (preferably all rows in the table) and select the Table | Keep Row Together menu option. If the row continues over the end of the page, the whole row is moved to the top of the next page.
|
|
||||||||||||
Set the text flow in the table rows |
Select the rows and select the Table | Row Text Flow menu option. The Table Text Flow dialog displays, on which you select a radio button to set the text flow in the rows to:
You can apply the text flow to just the selected rows, or select the Apply to all rows in the current table checkbox to set the text flow for all rows in the table. This option also moves the selected rows over to the appropriate side of the page or column.
|
|||||||||||||
Set the width of selected cells |
Select the cells to act on and select the Table | Cell Width menu option. The Set Cell Width dialog displays, on which you set the width of the cells and the margin between the text and the left and right sides of each cell, both in twips. You can apply the settings to:
|
|
||||||||||||
Define the width of the cell borders |
Select the cells to act on and select the Table | Cell Border Width menu option. The Set Cell Border dialog displays, on which you set the width of the lines at any or all of the top, bottom, left and right of the selected cells. If you want the border to enclose:
You can also set the margin between the text in each cell and the left and right borders, in twips, and apply all the settings to:
|
|
||||||||||||
Define the color of the cell borders |
Select the cells to act on and select the Table | Cell Border Color menu option. The Set Cell Border Color dialog displays, on which you set the color of each of the lines at the top, bottom, left and right of a cell, or all of the cell borders at once. You can apply the settings to:
|
|
||||||||||||
Define the degree of shading on the cell color |
Select the cells to act on and select the Table | Cell Shading menu option. The Cell Shading Parameters dialog displays, in which you type the shading percentage. Shading is the intensity of the cell background color, expressed as a percentage, and is uniform across the selected cells. If the cells have no colored background, a shading of 0% is white. For colored backgrounds, 0% is the color initially set. In all cases, a shading of 100% is black. You can apply the setting to:
|
|
||||||||||||
Define the background color of the cell |
Select the cells to act on and select the Table | Cell Color menu option. The Cell Color Parameters dialog displays. Click on the Set Color button to display the Color dialog, on which you select a basic color or define a more specific color. When you have selected the color, click on the OK button. You can apply the setting to:
|
|
||||||||||||
Vertically align text in cells |
Select the cells to act on and select the Table | Cell Vertical Align menu option. The Cell Vertical Alignment dialog displays, on which you select to align the text in the selected cells by the top, center or bottom of the cell or the baseline of the lowest top line of text. Text in a table defaults to being aligned with the top of the cell and, as you type it in, it scrolls downwards. You can change this alignment to the center or bottom of the cell so that text scrolls out from the center or up from the bottom of the cell. If you have special formatting - such as 'before-paragraph' spacing - you can align the text to the base of the lowest first line (the baseline), so that text in a row of cells is aligned with the special formatted text rather than with the top or bottom of the cell. If the special formatting is changed or removed, the text remains aligned. You can apply the setting to:
|
|
||||||||||||
Rotate the text of a cell to display vertically |
Select the cells to act on and select the Table | Cell Rotate Text menu option. The Cell Text Rotation dialog displays, on which you select to display text vertically up the cell, vertically down the cell or, if the text is already vertical, horizontally across the cell, Text in a table defaults to running horizontally across the cell from left to right, and scrolling down the cell from top to bottom. You can change the text position so that the text is rotated through 90 degrees to display:
If the text is running horizontally, you can type as much as you need - the row height increases to accommodate the text. If the text is running vertically, you adjust the row height and column width manually to accommodate your text. You can apply the setting to:
|
|
Notes
• | Under some circumstances, a table in a generated RTF report might repeat the header row rather than the output row; if this occurs, create another row in the table between the header row and the output row, and leave this blank |