Create Simple Source with Filters and Looping Element Group

In our Asset Integrity Report, we want to display some data from the Pipeline AIG for specific assets. For each relevant asset, we want to see a vertical table that shows these pipeline data.

For this, we need an element group that loops on assets and contains a vertical table that retrieves data from the Pipeline AIG. The vertical table will then be filled with pipeline data for each filtered asset one by one when the report is generated.

In this step, you create a looping element group, which is linked to a simple source that filters the relevant assets. You can then create the actual vertical table in the next step.

See the detailed steps below:

Prerequisites

You have completed the following step:

Process

1. Insert a simple source for Asset Location.

  1. Add a Simple Source element to the Report Layout structure (drag or select it and choose Add). The Simple Source element is located under the SOURCES node within the Template Definition section of the dialog. one

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

  3. On the Properties tab, specify the name Anomaly* for the simple source. three

  4. In the Table field, click the ellipsis ellipsis to select the System Table Anomaly. four

  5. Click OK. five

    _images/report.template.asset.simplesource-asset-location.png

2. Add an asset tree filter to the Asset Location simple source.

We want to allow the user to filter based on a specific branch of the asset tree. When generating the report, the user will see a selection dialog where they can select the required asset tree branch.

To do that, update the simple source as follows:

  1. Double-click the Asset Location Simple Source and go to the Filters tab.

  2. Under Field, use the drop-down list to select the VN_ID field.

    Note

    • The drop-down list includes all the fields from the Asset Location table that is linked to this simple source.

    • VN_ID is the unique identifier of an asset in the hierarchy. When you select this field, an additional value becomes available under Comparison, called Is Child Of.

  3. Under Comparison, choose Is Child Of, which allows returning assets under a specific node within the asset tree.

  4. Under Parameter, select User, which indicates that the user has to select the specific VN_ID value when generating the report.

  5. Under Value, enter VN_ID.

  6. Choose OK.

    _images/report.template.asset.simplesource-filter_vnid.png

3. Add filters for asset name and asset type.

In addition to the filtering added to the Asset Location simple source above, we want to filter on assets that fulfill either of the following criteria:

  • They have PL in their asset name

  • They have the asset type Pipeline, Pipeline Section, Piping Circuit or Piping Line

  1. Still on the Filters tab of the Edit Simple Source dialog, click the + (plus) sign at the end of the first filter to create a new filter.

  2. Specify the following values for the filter:

    • Field: Since we want to filter assets that have PL in their asset name, select the Name field from the drop-down list.

    • Comparison: Select Like, which is a “contains” operator relevant for alphanumeric fields.

    • Value: Enter %PL%, which refers to any name that contains PL.

    We now have the second filter set up.

  3. Click the + (plus) sign at the end of the second filter to create a new filter.

  4. Specify the following values for the filter:

    • Field: Since we want to filter assets based on their asset type, select the Asset Type field from the drop-down list.

    • Comparison: Select In, which allows multiple selections for asset type, that is, this would return any asset that has either of the selected asset types.

    • Value: Use the ellipsis ellipsis to select the asset types Pipeline, Pipeline Section, Piping Circuit and Piping Line.

    _images/report.template.asset.simplesource-filter_type.png

    We now have the third filter set up.

  5. While we want the first filter for VN_ID to be always applied, at the same time, we want EITHER the second OR the third filter to be applied. That is, we want assets to be returned if either they have PL in their asset name, or they have the specified asset types. To make this possible, we need to group the second and third filter with an Any connector:

    1. Under Field, select the checkboxes next to the second and third filters. The Group and Ungroup toolbar buttons become available.

    2. Choose Group.

    3. A new grouping is created for these two filters, with a drop-down option. Select Any.

    4. Choose OK.

    _images/report.template.asset.simplesource-filter_group.png

4. Insert an element group that loops on assets.

  1. Add an Element Group element to the Report Layout structure right after the Section Heading.

    Tip

    If the element is not inserted to the right location in the element structure, use the Move Up or Move Down buttons in the toolbar to move them to the correct place.

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

  3. Enter data as follows:

    • Name: Enter a descriptive name, such as Loop on Each Asset.

    • Source: Select the Asset Location source that you created in the previous step.

    • Sourt Column: Select, for example, Asset, which means that data will be sorted based on the Asset column of the Asset Location table.

    • Sourt Order: Select Ascending.

    • Repeat Elements: Tick the checkbox.

    • Action: Select All Rows to repeat elements for all the rows in the source.

  4. Click OK.

    _images/report.template.asset.elementgroup-loop.png

Proceed to Next Step next