User`s guide
13 Create a Report Program
13-68
row = TableRow();
append(row,TableEntry('data11'));
append(row,TableEntry('data12'));
append(table,row);
append(rpt,table);
close(rpt);
rptview(rpt.OutputPath);
Format a Table Row
Use these format objects and format properties to format a table row.
Row Height Formatting Format Object Format Property
Specify the exact height of a
row
RowHeight Height
Specify the minimum height
of row (Word only)
RowHeight n/a
Cause this row to repeat as
header row when a table
flows across pages
RepeatAsHeaderRow n/a
Allow this row to straddle a
page boundary
AllowBreakAcrossPages n/a
Format Table Columns
To format table columns, you can use mlreportgen.dom.TableColSpecGroup
objects, either alone or with mlreportgen.dom.TableColSpecGroup objects. Use a
TableColSpecGroup object to specify the format of a group of adjacent table columns.
Use a TableColSpec object to override, for some table columns, some or all of the
formats of a column group. In this example, the TableColSpecGroup property specifies
a column width of 0.2 inches and green text. The TableColSpec overrides those formats
for the first column, specifying a width of 0.5 inches and bold, red text.
import mlreportgen.dom.*
rpt = Document('test');
rank = 5;