Almost every report will need at least one section unless you use a repeating table as explained in the next section. A repeating section is a paragraph that will be repeated for a chosen item in the XML file, e.g. if you want to do something for each room in the XML. Sections can also be nested inside each other. To create a section do one of the following:
- Position the cursor where you want to insert the section and select Insert->Repeating Section. In the following window you can define an Xpath expression to what you want to repeat on (see previous chapter about XPath). The easiest way is just to navigate to the data, double click on the node (in this example room) and the expression is created for you. Then click OK
Image 3: Edit Xpath expression window
- You can also locate the item you want to repeat on and drag it from the Data Source window (pane 3 in Image 2) onto the document where you want it. When you drop it, choose Repeating Section.
When this is done, the text “Customize this for…..” will appear. Remove this and start placing text or fields (see 3.7).