sure not a problem!
below is the rule for the Table:
var DataSource = "Multi-line records"; // "Data Source:" (Required): DataSourceList
var Columns = // "Column": MultiGroup with fields:
[
{ "Field": "name", "Heading": "Biomarker", "Width": HundredthsOfPointsFromText("2 in"), "HAlign": "Left", "VAlign": "Middle", "Format": { }, },
{ "Field": "observation", "Heading": "Result", "Width": HundredthsOfPointsFromText("1 in"), "HAlign": "Left", "VAlign": "Middle", "Format": { }, },
{ "Field": "interpretation", "Heading": "Finding", "Width": HundredthsOfPointsFromText("1.5 in"), "HAlign": "Left", "VAlign": "Middle", "Format": { }, },
];
var Style = "Biomarker Results Table Format";
var StretchColumnsToFrameWidth = true;
var table = new FPTable;
if (Style)
table = Rule(Style);
for (var i in Columns)
table.AddColumn(Columns[i].Width);
var header = table.AddRow();
header.Type = "header";
for (var c in Columns)
{
var column = Columns[c];
var cell = header.Cells[c];
cell.Content = TaggedTextFromRaw(column.Heading || column.Field);
cell.HAlign = column.HAlign;
cell.VAlign = column.VAlign;
if (table.style && table.style.headerStyle)
{
var HeaderStyle = table.style.headerStyle;
cell.Font = HeaderStyle.family;
cell.Bold = HeaderStyle.bold;
cell.Italics = HeaderStyle.italic;
cell.PointSize = HeaderStyle.pointsize;
cell.TextColor = HeaderStyle.color;
}
if (table.style && table.style.each_cell.Rulings)
cell.Rulings = table.style.each_cell.Rulings;
if (table.style && table.style.each_cell.Margins)
cell.Margins = table.style.each_cell.Margins;
}
// Create the main body from the data.
var data;
if (DataSource == "Multi-line records")
data = FusionPro.GetMultiLineRecords();
else
data = FusionPro.GetDataSource(DataSource);
for (var r = 1; r <= data.recordCount; r++)
{
var row = table.AddRow();
for (var c in Columns)
{
var column = Columns[c];
var cell = row.Cells[c];
cell.Content = FormatGenericTagged(column.Format, data.GetFieldValue(r, column.Field));
cell.HAlign = column.HAlign;
cell.VAlign = column.VAlign;
if (table.style && table.style.bodyStyle)
{
var BodyStyle = table.style.bodyStyle;
cell.Font = BodyStyle.family;
cell.Bold = BodyStyle.bold;
cell.Italics = BodyStyle.italic;
cell.PointSize = BodyStyle.pointsize;
cell.TextColor = BodyStyle.color;
}
if (table.style && table.style.each_cell.Rulings)
cell.Rulings = table.style.each_cell.Rulings;
if (table.style && table.style.each_cell.Margins)
cell.Margins = table.style.each_cell.Margins;
}
}
if (StretchColumnsToFrameWidth)
table.StretchColumnsToFrameWidth();
return table;
and we also have a Table Format Rule: