Data from Oracle table and views can be easily exported to Word-tables. Use the following steps when you don’t know at design-time how many rows will be placed into the table given report parameters.
- For each word-table, CustomXML Tree must contain 2 nodes:
- Parent Node. Select from node’s Data Source with applied Condition will define the number of rows in word-table. Parent Node may have no Node Attributes.
- Child Node. Select from node’s Data Source with applied Condition must return only 1 row. Condition of Child Node must contain reference to parent node (in square brackets), e.g.
employee_id = [employees.employee_id]
. Child Node contains Node Attributes which are mapped to word-table columns. For example:
- Report template must contain a table with (at least) 1 empty row.
- Nodes of Empty CustomXML must be mapped to MS Word Content Control this way:
- Select the whole empty row of word-table (by clicking on the left of it). Select Parent Node in XML Mapping pane, right-click on it, and from the popup menu select Insert Content Control > Repeating. For example:
- Again select the whole empty row of word-table. Select Child Node in XML Mapping pane, right-click on it, and from the popup menu select Map to selected Content Control. For example:
- For each column of word-table, place cursor in the column, select the proper attribute of Child Node, right-click on it, and from the popup menu select Insert Content Control > Plain Text. For example:
- Aggregate values (like a total number of rows, sum of row amounts, etc.) can be transferred into the word-table in attributes of Parent Node.
- Save the report template and upload it into the report definition.