Tables are widely used in almost every area of human endeavor to ensure precision, correctness and comparability of data. They organize text into rows and columns, which can make information easy to consolidate and analyze.
The template syntax, which was extensively described in the previous sections, can be applied to tables in the form of data bands and conditional expressions. This is used to generate a range of output rows given a range of different input data elements.
There are several useful techniques you can use within your template expressions to customize table generation. They can be best illustrated with simple examples provided below.
Generating a Simple Table
The following example shows how to generate a simple In-Table List:
Customer
Order Price
<<foreach [in customers]>><<[CustomerName]>>
<<[Order.Sum(c => c.Price)]>><</foreach>>
Total
<<[Sum(m => m.Order.Sum(c => c.Price))]>>
Varying Table’s Contents
The following example shows how to generate an In-Table List with a variable contents using conditional expressions: