cancel
Showing results for 
Search instead for 
Did you mean: 
Tony_Maimone
Star Collaborator
Star Collaborator

When we talk about Document Composition's ability to dynamically populate information into letters/correspondence, often we talk in terms of text. Different placeholders are designed to insert different data types, and in this case Document Composition can be used to dynamically insert your table data into your correspondence to create easily digestible information.

There are two different ways to insert a table in Document Composition:

  1. Using an XML placeholder
  2. Using an External Database query

Using an XML Placeholder:

For solutions using XML to drive composition, the results of the XML query will automatically populate a table in the composed document. Instances of this placeholder will appear on the document as an empty table.

An example XML the would produce a one row, three column table is:

<Data>

<Person> 

<FirstName>John</FirstName>

<MiddleInitial>C</MiddleInitial>

<LastName>Doe</LastName>

</Person>

</Data>

The sample XPath query to create this very simple table would be /Data/Person

When the placeholder is inserted into Microsoft Word, it will look like the following

 

 

 

{Person}

 

 

 

 

 

 

Using an External Database query:

For solutions that need get retrieve table data from an external system, the results of the query will automatically populate a table in the composed document. Instances of this placeholder will appear on the document as an empty table. Database Queries can be created in two ways (1) from the Control Panel by selecting the Queries tab and then the New Query Button or (2) when creating an ODBC placeholder there is a New Query button.

 

 Here the you can specify SQL and use local Placeholders within the SQL statement via Insert Placeholder button. The user supplies the datasource (which the Application server will need to have access to) username and password for the datasource.

How do you set up column headers for tables?

Any column headers entered in the top row of the table are preserved when the values are retrieved from either XML or an External Datasource. Using our Person example from before, you could add the following in the header row:

 First Name

 Middle Initial

 Last Name

{Person}

 

 

 

 

 

and would provide the following output

First Name

Middle Initial

Last Name

John

C

Doe

 

How do you eliminate an unnecessary column of information from the table using an XML Placeholder?

When inserting results as a table from an XML placeholder, the configuration specifies which column names to select which should be comma separated. In our current example, the following columns names would be used: FirstName,MiddleInitial,LastName. If there were other elements in the XML, they would not be included in the table.

How do you eliminate an unnecessary column of information from the table using an ODBC placeholder?

When inserting the results of an ODBC placeholder as a table, all of the values are inserted into the table. In order to change the data inserted, you would need to update the current SQL query to eliminate columns that are not needed for your template.

How do you set up Table Styles?

In Microsoft Word, select the table and then the design tab within the Office Ribbon. There are a number of preset Table Styles available or you can create your own. These will give your table output a consistent look and feel and allow your document to maintain a cohesive style. Document Composition will merge the Table Style applied on the template to the composed document.

How do you set up table formatting?

In OnBase 16, SCR 148877 and 247864 were completed for build 16.0.0.31 that updated how Document Composition tables can be formatted. The row containing the placeholder will inherit formatting when composed. For instance, if we set the cell with the Person placeholder cell text color to red and bold and the cell below the last name header to text color to aqua, italic, and right justified.

 First Name

 Middle Initial

 Last Name

{Person}

 

 

 

 

 

the the output would be the following:

First Name

Middle Initial

Last Name

John

C

Doe

Tony

Maimone

*Within Microsoft Word, you may not be able to see the font and paragraph formatting for the table placeholder if there is not any text in the cell. Generally, you will need to select the cell in question and select the Home tab to see what Font and Paragraph settings are set.