Latest News

the latest news from our team

Paginating XML Data

Where most printed reports used as data sources for eFORMz have clearly defined pages, this does not exist in XML files. Using the eFORMz “XML Input” Page property, you divide your XML data into ‘logical’ input pages. These logical pages can be used to greatly simplify the design of your project.

This example is of a picklist with numerous lines. It works for data that is less than one full page or many pages in length.

Prerequisites

  • eFORMz Composer 10.02 or higher installed
  • A data file in XML format

Procedure

Complete the following steps to paginate your XML data.

  1. Start the eFORMz Composer and open your project.
  2. Load your XML data by right clicking the form icon in the Project window > Display Form and Data and select your data file.
  3. In the Viewer window, right click the top object > Add Variables to add all of the XML variables to the form.XML1
  4. Create a document template on the form. Data that is paginated is usually in a table with variables in columns of the table. Add a row to the table, add cells to the row for as many columns as you want displayed. To each cell, add a paragraph and a variable value.
  5. Right click the row > Edit > General. XML2
  6. Select Normal row. In the Repeat using section, click Repeat of variable and select one of the variables included in your table.
  7. In the Span Pages area, do not select Allow, and click OK.
  8. In the Project window, right click an XML variable > Edit. Copy the value in the Data Node field and close the window. You use this value to specify pagination.
  9. In the Project window, right click the page > Properties > XML Input:
  10. Click by Tag count. The Record Tag field sets which level of data is shown. The Pagination Tag field sets the level that makes up one page.
  11. Paste the value from Step 8 into the Pagination Tag  field. Delete fields from the right until the value ends with the field you want to paginate by. For example, if the value is data/INVOICE/ITEM/FIELDQTY, and I want to paginate by invoice, I delete the right two fields, leaving data/INVOICE.
  12. Click OK.
  13. You may also have the Record Tag set to /INVOICE/ITEM/FIELDQTY and the pagination Tag as ITEM/FIELDQTY. This will cause the XML to paginate by invoice, but will continue to keep the ITEM information with FIELDQTY.
  14. You might need to adjust the table margins, fonts, and other attributes to suit your design requirements. If your list extends beyond the bottom of the page, set the Document Template’s margin for Bottom. The number you specify is how many decipoints above the end of the page the document template ends. 720 decipoints is one inch.
  15. Save your changes.

Leave a Reply

Your email address will not be published. Required fields are marked *