REPORT namespace

Programmatic HTML report generation for analysis pipelines.

Symbols in this namespace: 20

SymbolKindCategoryDescription
REPORT.ADD_CODEFunctionReport functionsAdds escaped preformatted code or log text.
REPORT.ADD_DIVIDERFunctionReport functionsAdds a horizontal divider.
REPORT.ADD_HTMLFunctionReport functionsReturns a report with a raw HTML block appended. Use only for trusted/generated HTML.
REPORT.ADD_IMAGEFunctionReport functionsReturns a report with an image embedded as PNG/base64. For stacks, frame selects the frame to embed.
REPORT.ADD_IMAGE_FILEFunctionReport functionsEmbeds an existing PNG/JPEG/GIF/WEBP/SVG image file as base64 in the report.
REPORT.ADD_KVFunctionReport functionsAdds one key/value row as a compact table.
REPORT.ADD_LISTFunctionReport functionsAdds a bullet list from a newline separated string or an array.
REPORT.ADD_METRICFunctionReport functionsAdds a metric card suitable for summaries and dashboards.
REPORT.ADD_NOTEFunctionReport functionsAdds an emphasized note block. Kind may be INFO, SUCCESS, WARNING or DANGER.
REPORT.ADD_SECTIONFunctionReport functionsReturns a report with a section heading appended. Level is clamped to H2..H4.
REPORT.ADD_TABLEFunctionReport functionsReturns a report with a 1D/2D ARRAY/TABLE rendered as an HTML table. Optional headers may be a comma/pipe separated string or a 1D array.
REPORT.ADD_TABLE_HEADERSFunctionReport functionsAdds a table with explicit column headers. Headers may be a comma/pipe/semicolon separated string or an array.
REPORT.ADD_TEXTFunctionReport functionsReturns a report with an escaped text paragraph appended.
REPORT.CREATEFunctionReport functionsCreates a closed HTML report object represented as text. Use REPORT.ADD_* to append items and REPORT.SAVE_HTML to write it.
REPORT.FROM_TEXTFunctionReport functionsReads a report back from text, wrapping plain fragments in a valid report document if needed.
REPORT.ITEM_COUNTFunctionReport functionsReturns the number of appended report items.
REPORT.SAVEFunctionReport functionsAlias of REPORT.SAVE_HTML(report,path).
REPORT.SAVE_HTMLFunctionReport functionsWrites the closed report to a UTF-8 HTML file and returns TRUE on success. REPORT.SAVE is an alias.
REPORT.TITLEFunctionReport functionsReturns the report title extracted from the H1 heading.
REPORT.TO_TEXTFunctionReport functionsSerializes a report to text. In the current implementation the report is already an HTML text object.

REPORT.ADD_CODE

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_CODE(report, code [, language])

Adds escaped preformatted code or log text.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
languageOptional parameter. If omitted, the command uses its internal default.

Minimal example

rep = REPORT.ADD_CODE(rep, scriptText, "cvbasic")

REPORT.ADD_DIVIDER

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_DIVIDER(report)

Adds a horizontal divider.

Minimal example

rep = REPORT.ADD_DIVIDER(rep)

REPORT.ADD_HTML

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_HTML(report, html)

Returns a report with a raw HTML block appended. Use only for trusted/generated HTML.

Minimal example

value = REPORT.ADD_HTML(report, html)

REPORT.ADD_IMAGE

FUNCTIONREPORTBATCH-FRIENDLYIMAGE
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_IMAGE(report, image [, caption [, frame]])

Returns a report with an image embedded as PNG/base64. For stacks, frame selects the frame to embed.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
captionOptional parameter. If omitted, the command uses its internal default.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

rep = REPORT.ADD_IMAGE(rep, img, "Processed image")

REPORT.ADD_IMAGE_FILE

FUNCTIONREPORTBATCH-FRIENDLYFILE I/OIMAGE
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_IMAGE_FILE(report, path [, caption])

Embeds an existing PNG/JPEG/GIF/WEBP/SVG image file as base64 in the report.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
captionOptional parameter. If omitted, the command uses its internal default.

Minimal example

rep = REPORT.ADD_IMAGE_FILE(rep, "out/plot.png", "Metric plot")

REPORT.ADD_KV

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_KV(report, key, value [, unit])

Adds one key/value row as a compact table.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
unitOptional parameter. If omitted, the command uses its internal default.

Minimal example

rep = REPORT.ADD_KV(rep, "FPS", STACK.FPS(st), "Hz")

REPORT.ADD_LIST

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_LIST(report, items [, caption])

Adds a bullet list from a newline separated string or an array.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
captionOptional parameter. If omitted, the command uses its internal default.

Minimal example

rep = REPORT.ADD_LIST(rep, "load ok\nfilter ok\nsave ok", "Pipeline")

REPORT.ADD_METRIC

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_METRIC(report, name, value [, unit [, comment]])

Adds a metric card suitable for summaries and dashboards.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
unitOptional parameter. If omitted, the command uses its internal default.
commentOptional parameter. If omitted, the command uses its internal default.

Minimal example

rep = REPORT.ADD_METRIC(rep, "SNR", 12.4, "dB", "clear event")

REPORT.ADD_NOTE

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_NOTE(report, text [, kind [, title]])

Adds an emphasized note block. Kind may be INFO, SUCCESS, WARNING or DANGER.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
kindOptional parameter. If omitted, the command uses its internal default.
titleOptional GUI/DataPlot window title.

Minimal example

rep = REPORT.ADD_NOTE(rep, "Low S/N: repeat the measurement", "WARNING", "Diagnostics")

REPORT.ADD_SECTION

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_SECTION(report, title [, level])

Returns a report with a section heading appended. Level is clamped to H2..H4.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
levelOptional parameter. If omitted, the command uses its internal default.

Minimal example

rep = REPORT.ADD_SECTION(rep, "Summary")

REPORT.ADD_TABLE

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_TABLE(report, table [, caption [, headers]])

Returns a report with a 1D/2D ARRAY/TABLE rendered as an HTML table. Optional headers may be a comma/pipe separated string or a 1D array.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
captionOptional parameter. If omitted, the command uses its internal default.
headersOptional parameter. If omitted, the command uses its internal default.

Minimal example

rep = REPORT.ADD_TABLE(rep, metrics, "Metrics", "Name,Value,Unit")

REPORT.ADD_TABLE_HEADERS

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_TABLE_HEADERS(report, table, headers [, caption])

Adds a table with explicit column headers. Headers may be a comma/pipe/semicolon separated string or an array.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
captionOptional parameter. If omitted, the command uses its internal default.

Minimal example

rep = REPORT.ADD_TABLE_HEADERS(rep, metrics, "Metric,Value", "Summary")

REPORT.ADD_TEXT

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_TEXT(report, text)

Returns a report with an escaped text paragraph appended.

Minimal example

rep = REPORT.ADD_TEXT(rep, "Result OK")

REPORT.CREATE

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.CREATE(title [, subtitle])

Creates a closed HTML report object represented as text. Use REPORT.ADD_* to append items and REPORT.SAVE_HTML to write it.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
subtitleOptional parameter. If omitted, the command uses its internal default.

Minimal example

rep = REPORT.CREATE("ROI Analysis")

REPORT.FROM_TEXT

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.FROM_TEXT(text)

Reads a report back from text, wrapping plain fragments in a valid report document if needed.

Minimal example

value = REPORT.FROM_TEXT(text)

REPORT.ITEM_COUNT

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ITEM_COUNT(report)

Returns the number of appended report items.

Minimal example

value = REPORT.ITEM_COUNT(report)

REPORT.SAVE

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.SAVE(report, path)

Alias of REPORT.SAVE_HTML(report,path).

Minimal example

ok = REPORT.SAVE(rep, "report.html")

REPORT.SAVE_HTML

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.SAVE_HTML(report, path)

Writes the closed report to a UTF-8 HTML file and returns TRUE on success. REPORT.SAVE is an alias.

Minimal example

ok = REPORT.SAVE(rep, "report.html")

REPORT.TITLE

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.TITLE(report)

Returns the report title extracted from the H1 heading.

Minimal example

value = REPORT.TITLE(report)

REPORT.TO_TEXT

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.TO_TEXT(report)

Serializes a report to text. In the current implementation the report is already an HTML text object.

Minimal example

value = REPORT.TO_TEXT(report)