3.2.09 Table with arbitrary number of columns (Dynamic table)

The introduction

In this example You can see how to output the simple table.

But, suppose that we need to output a table that has variable number of columns (ie, the number of rows and columns becomes known only at program runtime).

For example, let's create a table, where the number of rows and columns will be determined at the printing program runtime by generating random numbers in a given range.

The data will be sent to the Form through the context, that has a table type, and each its row will contain nested subtable containing information about all the cells are in the row (the so-called "flexible" data representation):