Create Table of Data for Anomaly Actions, Use Style Prefix

In this step, you create a Table of Data to list the anomaly actions and you want to use a Style Prefix to apply a specific colour to even rows.

For that, you create the following:

  • A level-2 Section Heading to be included in the output before the table

  • A Simple Source for the Anomaly Actions system table, from which the Table of Data can retrieve data

  • The actual table of data for the Anomaly Actions applying a Style Prefix to it

See the detailed steps below:

Prerequisites

You have completed the following steps:

Process

In this example, you work in the same Anomaly Tables Element Group that you have created in the previous step.

1. Insert a level-2 Section Heading for the list of anomaly actions.

  1. Add a Section Heading element to the Report Layout structure so that it is included within the Anomaly Tables 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, Anomaly List 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. This time, we just want to use the heading Anomaly Actions, but you can use right-click in this field if you want to add a variable.

  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.

    _images/report.template.anomalysummary.sectionheading2-actions.png

2. Insert a Simple Source for Anomaly Actions.

This simple source will be used as the data source for the anomaly actions Table of Data that we are going to create.

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

Note

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

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

  2. Specify the name Anomaly Action* for the simple source.

  3. In the Table field, click the ellipsis ellipsis to select the System Table Anomaly Action.

  4. Click OK.

    _images/report.template.anomalysummary.simplesource-anomaly.action.png

3. Insert a Table of Data element for Anomaly Actions.

  1. Add a Table of Data element to the Report Layout structure so that it is included within the Anomaly Tables element group and it is below the Section Heading element that you created for Anomaly Actions.

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

  3. On the Properties tab, make settings as follows:

    • Name: Enter Anomaly Actions

    • Description: Enter a descriptive text, such as List of anomaly actions from Anomaly Action table

    • Tick the following checkboxes:

      • Show Caption

      • Fit Window

      • Hide Columns with No Values

    • Source: Select the Anomaly Action source from the drop-down list. The available values in this field are retrieved from the sources that have been created under the current element group.

  4. On the Layout tab, you can hide columns or rearrange the layout as required, see the previous example for more information.

  5. Click OK.

    _images/report.template.anomalysummary.table-anomaly.action.png

4. Create a new style for even rows.

The default colour for odd rows is white and for even rows, it is grey. In this example, you want to change the colour of even rows to light blue. To do that, follow the steps below:

  1. Click OK to save your changes to the report template and go back to the Configuration - Templates dialog.

  2. Choose the Styles toolbar button. one

  3. Choose Add to define a new style for even rows. two

  4. Specify a name, which includes the name of the default style plus a prefix, for example, “New Table Even Rows”. three

    In this case, the prefix is “New” and “Table Even Rows” is the same as the name of the default style.

  5. In the properties of the “New Table Even Rows” style, change the Background Colour field value to a light blue colour. four

    If you do not change the other values, the default “Table Even Rows” style will be applied for the rest of the settings.

  6. Click OK. five

    _images/report.template.style_prefix.even_rows.png

5. Apply the New style prefix to your Table of Data.

  1. Double-click your report template to edit it again.

  2. Edit the Anomaly Actions Table of Data, to which you want to apply the new style (double-click it or select it and choose Edit).

  3. Enter New in the Style Prefix field.

  4. Click OK.

    _images/report.template.anomalysummary.table-anomaly.action_style.png

Result

When you generate the output, it now contains the table with the new style:

_images/report.template.anomalysummary.style_prefix.png

Proceed to Next Step next