Add Table of Data for Event Types with Distinct Source

In this step, we work in the same Findings Element Group as in the previous step, but now we want to create a table that lists all the event types that are related to the findings in a selected workpack. For this, we’ll need a distinct source that returns the Event Type field values within the Finding Simple Source (created in the previous step). In this step, we create the following elements:

  • A level-2 Section Heading

  • A Text (Paragraph) element to include a description

  • A Distinct Source

  • The actual Table of Data

See the detailed steps below:

Prerequisites

You have completed the following steps:

Process

1. Insert a level-2 Section Heading for the Table of Data.

  1. Add a Section Heading element to the Report Layout structure so that it is included within the Findings element group.

  2. Double-click the element in the structure to edit it.

  3. Enter a name that identifies the element in the structure, for example, Event Types Heading 2. This text does not appear in the actual report output.

  4. Enter the text of the heading that you want to see in the output in the Content field, for example, Relevant Event Types.

  5. Select the Include in Table of Contents checkbox to have this section heading appear in the Table of Contents.

  6. In the Default Style field, select Heading 2, which is a preconfigured style that can be applied for level-2 section headings. If required, you can set up your own style and apply that instead (see Styles).

  7. Click OK.

2. Insert a Text (Paragraph) element for introduction.

You want to insert an introductory text to the report before the Table of Data. You want this text to include the workpack ID that the user selects when generating the report, thus, it has to be a variable. To do that, you add a Text (Paragraph) element as shown below:

  1. Add a Text (Paragraph) element to the Report Layout structure so that it is included within the Findings element group and it comes after the Section Heading element.

  2. Double-click the new element in the structure to edit it.

  3. In the Content field, enter text as follows:

    1. Enter See below the list of event types that are related to the findings in workpack .

    2. Right-click and choose Parameters ‣ Workpack (Workpack_ID) to select the user parameter that you have added to the Finding Simple Source earlier.

  4. Click OK.

3. Insert a Distinct Source for the Table of Data.

The Distinct Source will use data from the Finding Simple Source, restricting it to the Event Type field.

  1. Add a Distinct Source element to the Report Layout structure so that it is included within the Findings element group. The Distinct Source element is located under the SOURCES node within the Template Definition section of the dialog.

Note

You must insert the distinct source within the element group, else, you cannot refer to it from the other elements of the element group.

  1. Double-click the Distinct Source element in the structure to edit it.

  2. Specify the name Distinct Source for Event Types*.

  3. In the Source field, select the Finding Simple Source. The available values in this drop-down list are the Simple Sources that are within the same Element Group.

  4. In the Columns field, select Event Type from the fields within the Finding source.

  5. Click OK.

    _images/report.template.workpack.distinct.source.png

4. Insert a Table of Data for Event Types.

We want the Table of Data to show the list of event types associated with the findings in the selected workpack.

  1. Add a Table of Data element to the Report Layout structure so that it is included within the Findings element group after the relevant Text (Paragraph) element.

  2. Double-click the element in the structure to edit it.

  3. On the Properties tab, make settings as follows

    • Name: Enter Distinct Event Types or any name that identifies the element in the structure.

    • Select the Hide Columns with No Values checkbox, leave the other checkboxes deselected.

    • Source: Select Distinct Event Types.

  4. On the Layout tab, change the value of Alignment to Left.

  5. Click OK.

    _images/report.template.workpack.table_of_data.png

Result

When you generate the output, you can see that a table has been added that shows the event types associated with the findings in the selected workpack. The text above the table shows the workpack ID that you selected when generating the report.

_images/report.template.asset.distinct.table-output.png

Proceed to Next Step next