Skip to Main Content

How to add tables into the report

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.

  1. For each word-table, CustomXML Tree must contain 2 nodes:
    1. 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.
    2. 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:
      Adding tables to the report - 1
  2. Report template must contain a table with (at least) 1 empty row.
  3. Nodes of Empty CustomXML must be mapped to MS Word Content Control this way:
    1. 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:
      Adding tables to the report - 2
    2. 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:
      Adding tables to the report - 3
    3. 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:
      Adding tables to the report - 4
  4. 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.
  5. Save the report template and upload it into the report definition.

Comments

Write a comment or question: