Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Use a repeat block to import multiple rows from a data source. A repeat block is a fragment in the template document - defined by a Word bookmark - that contains merge fields and that will be repeated for each row in a data source. To import multiple rows from a single data source, create a repeat block in the template and, in the WordWriter code, call SetRepeatBlock to bind the repeat block to a data source.
The main document is any part of the template that is not within a repeat block. SetDataSource sets a single-row data source for merge fields in the main document. If you pass SetDataSource a ResultSet that contains more than one row, WordWriter will import the first row to the template. Multiple row data sources can be imported to repeat blocks only, not to main document merge fields.

Please note that WordWriter does not support nested repeat blocks. Repeat blocks may not be located within other repeat blocks.

To create a repeat block:

...