Create Sections as Tables

In a document report template, you can render a model section as a table, defined with any number of columns but with only two rows:

The first row is used to describe the headings of the columns, which you define and format yourself
The second row defines the output, which you specify by right-clicking in each cell and selecting the output type from the field list; the output is then generated iteratively for every occurrence of the section in question
 

For example, you might set up the Model > Glossary > section as a section table, using the table definition:

RFTTemplateGlossary

 

This table definition renders the document output:

RTFTemplateGlossaryOut

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.

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.

 

 

 

 

 

 

Create Tables

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.

 

 

Populate data row with fields

Right-click on the table cell and select the Insert Field | <field name> option to add one or more fields to the cell.

When the report is generated, the field values are extracted and displayed in the table for each instance of the object, such as an element or attribute.

 

 

Notes

In a document report template, if you type a carriage return between the end of the table and the section terminator, the table you generate has a line space between the rows; for example:
 

RTFTableCR
 

This generates the table:
 

 

Element Name

Author

 

Choose Recipient

John Redfern

                                                                                                                              Line Space

 

Manage Contacts

Walter Frederick

 

To avoid this, remove any carriage return between the end of the table and the section terminator, as follows:
 

RTFTableNoLine

This generates a table with no space between the rows:
 

 

Element Name

Author

 

Choose Recipient

John Redfern

 

Manage Contacts

Walter Frederick

 

Learning Center topics

Alt+F1 | Enterprise Architect | Reporting | RTF Templates | Add a Table (to a report)