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.
Add a Section Heading element to the Report Layout structure so that it is included within the Findings element group.
Double-click the element in the structure to edit it.
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.
Enter the text of the heading that you want to see in the output in the Content field, for example, Relevant Event Types.
Select the Include in Table of Contents checkbox to have this section heading appear in the Table of Contents.
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).
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:
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.
Double-click the new element in the structure to edit it.
In the Content field, enter text as follows:
Enter See below the list of event types that are related to the findings in workpack .
Right-click and choose
to select the user parameter that you have added to the Finding Simple Source earlier.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.
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.
Double-click the Distinct Source element in the structure to edit it.
Specify the name Distinct Source for Event Types*.
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.
In the Columns field, select Event Type from the fields within the Finding source.
Click OK.
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.
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.
Double-click the element in the structure to edit it.
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.
On the Layout tab, change the value of Alignment to Left.
Click OK.
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.