You can restart list numbering within your documents dynamically using restartNum tags. In particular, this feature is useful when working with a nested numbered list within a data band as shown in the following example.
Assume that you have the Order and Service classes defined in your application as follows.
Given that orders is an enumeration of Order instances, you could try to use the following template to output information on several orders in one document.
But then, a result document would look as follows.
That is, there would be a single numbered list across all orders, which is not applicable for this scenario. However, you can make list numbering to restart for every order by putting a restartNum tag into your template before a corresponding foreach tag as follows.
Note – When using with a data band, it is required to put a restartNum tag before a corresponding foreach tag in the same numbered paragraph.
Then, a result document looks as follows.
Note – You can use a restartNum tag without a data band to dynamically restart list numbering for a containing paragraph, if needed; for example, the tag can be used to restart list numbering for a document inserted dynamically (see “Inserting Documents Dynamically” for more information).