A report can contain numbered or unordered lists where a number of list items is not known at design time. Adding lists reminds adding tables.
- For each list, CustomXML Tree must contain 2 nodes:
- Parent Node. Select from node’s Data Source with applied Condition will define a number of rows in the list. 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:
- Nodes of Empty CustomXML must be mapped to MS Word Content Control this way:
- In the report template click the Bullets or Numbering button to create 1st empty list item:
- Select this first empty item by click on the left of it. In the XML Mapping pane select your CustomXML part from the dropdown list. Then select parent node. Right-click on it. And from the popup menu select Insert Content Control > Repeating:
- Again select the first empty list item by clicking on the left of it. In XML Mapping pane select child node. Right-click on it. From the popup menu select Map to Selected Content Control. Nothing changes visually, though Words makes some internal binding.
- In the first empty list item place the cursor between opening and closing tags. In the XML Mapping pane select the attribute of the child node whose value you want to be shown in the list. Right-click on the attribute. From the popup menu select Insert Content Control > Plain Text:
- Save the report template and upload it into the report definition. The generated report may look like this: