Using controls within a repeater
How to use nested repeater controls
Overview
This topic describes how to configure flow document controls within a Repeater control. The Repeater control allows you to organise the display of information from data sources, in particular from AQS type data sources that output a large quantity of data, see Create AQS data source.
The repeater control is designed to be used with data sources where the output contains one to many relationships (see Joining data sources) similar to the example illustrated:
In this example the network has many network items (streets), each network item has several asset types and each asset type has many assets (lights and bollards) associated with it.
The output of a data source for the example illustrated would be similar to that shown below:
It is apparent that some of the columns contain repeated data, the repeater control in conjunction with other controls allows you to format the output to remove the repeated data and group the data in a meaningful way.
The formatted report for this data would appear similar to the example illustrated below:
Creating the report layout
To create the report layout to present the data in the example illustrated above requires you to use a set of nested repeater controls. The following procedure describes how to configure the controls.
-
Open Report builder, see Report builder.
-
Define the data source, see Defining data sources.
This topic assumes that the data source (Network Street lights) has already been created.
- You can now create a flow document using a set of nested repeater controls, see Document layout editor.
Creating the parent repeater control
The first control that you need to create is the parent repeater.
- To create the controls to format the data from the data source select the Repeater control, see Flow Repeater control, for more detail when creating the repeater control.
-
Select the ‘Network Street lights’ as the Data source, this will be the Parent for the formatting controls.
-
Select the ‘Network’ header as the Header to repeat on, the repeater will use this to define how many times the repeater cycles through the data.
Creating a text control in the parent repeater control
To create a simple heading for the data within the parent repeater you can create and insert a text control, see Flow text control, for more details on text controls.
- Select a Text control from within the repeater control.
- When you are configuring the text control Text field you are provided with the option to select a data source when you choose the Dynamic option. You are provided the option to select the Parent context “Repeater” as a data source, which allows you to use the data source managed by the repeater control.
The following illustrates the sequence of dialogs that allow you to select the Parent context “Repeater”.
Nesting a child Repeater control
In order to group the data by Network Item within the Network, you need to create another repeater control within the parent Repeater control.
- Select the Repeater control, see Flow Repeater control, for more detail when creating the repeater control.
- When you select the data source you should select the Parent context “Repeater”. If you select the ‘Network Street lights’ directly you will negate the effect of the parent repeater control.
- Select the ‘Network Item’ header as the Header to repeat on, the repeater will use this to define how many times the repeater cycles through the data and groups the data by network item.
Creating another text control in the nested repeater control
To create a simple heading for the data within the nested repeater you can create and insert a text control, see Flow text control, for more details on text controls.
- Select a Text control from within the repeater control.
- When you are configuring the text control Text field you are provided with the option to select a data source when you choose the Dynamic option. You are provided the option to select the Parent context “Repeater” as a data source, which allows you to use the data source managed by the repeater control.
The following illustrates the sequence of dialogs that allow you to select the Parent context “Repeater” for a text control.
Nesting a Repeater control
In order to group the data by Asset type within Network Items, you need to create another repeater control within the child repeater control.
- Select the Repeater control, see Flow Repeater control, for more detail when creating the repeater control.
-
When you select the data source you should select the Parent context “Repeater”. If you select the ‘Network Street lights’ directly you will negate the effect of the parent repeater control.
-
Select the ‘Asset type’ header as the Header to repeat on, the repeater will use this to define how many times the repeater cycles through the data and groups the data by asset type.
The following illustrates the sequence of dialogs that allow you to select the Parent context “Repeater” for a text control.
Creating another text control in the nested repeater control
To create a simple Asset type heading for the data within the nested repeater you can create and insert a text control, see Flow text control, for more details on text controls.
- Select a Text control from within the repeater control.
- When you are configuring the text control Text field you are provided with the option to select a data source when you choose the Dynamic option. You are provided the option to select the Parent context “Repeater” as a data source, which allows you to use the data source managed by the repeater control.
The following illustrates the sequence of dialogs that allow you to select the Parent context “Repeater” for a text control to display the Asset type heading.
Creating a table control for the Asset list
The final part of this example requires you to create a table control to display list of assets within each asset type. This table needs to be placed within the nested child repeater control below the asset type text control.
- Select a Table control from within the child repeater control.
-
When you select the data source you should select the Parent context “Repeater”. If you select the ‘Network Street lights’ directly you will negate the effect of the parent repeater control.
-
Select the ‘Asset’ header as the Headers value, the repeater will use this to define the data associated with each asset type.