Using the Repeater properties, # Of Items and Based On Spreadsheet, you can specify how many times a component must be repeated on the page and define the range associated with this repeated component.
The Based On Spreadsheet property lets you repeat a component by binding this property to a vertical or horizontal range.
To bind the property to a range, first bind it to a cell, and then either:
- Select the AUTO and down direction to use all the cells going down until a blank cell is found (vertical range).
- Select the AUTO and right direction to use all the cells going right until a blank cell is found (horizontal range).
The range length, or the number of consecutive non-empty cells in the range, will determine how many times the component is repeated.
The following shows a detailed example of how to repeat a component using the Based On Spreadsheet property:
In the spreadsheet, in an empty cell, enter "bound," and then enter "vertical" in the 2 cells under the "bound" cell. Enter "horizontal" in the 2 cells to the right of the "bound" cell.
On the Repeater tab, hover over the blue dot to the left of Based On Spreadsheet, and then click that appears.
Select the "bound" cell.
Select a range:
- To use a vertical range, click . The range includes all the cells below the "bound" cell until a blank cell.
- To use a horizontal range, click , and then click . The range includes all the cells to the right of the "bound" cell until a blank cell.
Three components are now displayed on the page, which corresponds to the number of non-empty consecutive cells in the range.
Note that the cell values do not affect the text in the repeated components: When you bind the Based On Spreadsheet property to the spreadsheet, non-empty cells in the selected range are used only to set the number of repeated components, the values in the cells are ignored.
Click to hide the Repeater tab, and then bind the text property to the same "bound" cell.
The text in the three repeated components now corresponds to the values in the range defined in the previous step.
When you use the # of Items property:
- The number of repeated components is fixed.
- The range associated with the repeated components is always vertical.
Here is an example of how to repeat components using the # Of Items property:
- Select a text component on the page, and then, on the Text Properties panel, click the Repeater button.
- On the Repeater tab that appears, set # Of Items value to 3. Three components are now displayed on the page.
- To increase the gap between the repeated components, adjust the slider above Gap as needed, or simply enter a value in the field above the slider.