Latest News

the latest news from our team

Creating a Table Using XML Data

Variables from XML data are in arrays. As a result, creating a table from them is simpler in some ways. However, customizing the table requires modest configuration. This example includes a table of items in a packing slip. The columns are SKU, Item Name, Quantity, Price, and Total. The following image shows values for the first two columns in the Variables window:XMLTable1

It is simple to create a basic table from XML data:

  1. Create a table and add a row.
  2. Add a cell, and add a paragraph to the cell.
  3. Right click the paragraph > Add text > Variable value.
  4. Select the variable from the list, and click OK.
  5. Repeat steps 2 through 4 to add additional columns.
  6. Adjust font, column widths, and other settings to meet your design requirements.

The following image shows this basic table. By default, the columns have equal widths. The second column has quite a bit of text, so it is wrapped within its column:XMLTable2

The following steps put the second column on its own line, which saves space and increases readability:

  1. Right click the row > Edit > General.
  2. Click Repeat of  variable, select the variable that goes on a separate line, and click OK.XMLTable3
  3. Right click the first cell in the table > Add Document Component > Table. Click OK.
  4. Add a row to the table.
  5. Drag the second cell below the new row and drop it there.
  6. In the Viewer, click the item description and drag the frame to the full width of the label:XMLTable4
  7. For better readability, you can change the font of the description to bold.
  8. Save your changes.

 

 

Leave a Reply

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