Report
The workspace report: its draft text, chart theme, pages and PDF or Word export.
The draft is the same one the Desktop report form edits. In Live mode, changes
appear in the open Desktop window, and export(...) writes the same document
as the report page's Download buttons. In headless mode, the draft belongs to
the headless workspace.
Constructor
Signature
Report(workspace: 'Workspace') -> NoneParameters
| Name | Type | Requirement | Default | Description |
|---|---|---|---|---|
workspace | 'Workspace' | Required | — | Owning workspace. |
Exceptions
ObjectDeletedError: If the workspace has been closed.
Example
workspace.report.title = "Grid stability study"
Properties
chart_theme
Theme of report charts, or None to follow Settings > General > Report charts.
Type: ReportChartTheme | None
Access: read, write
Example
print(workspace.report.chart_theme)
conclusions
Optional conclusions placed after every chart and table; blank omits the section.
Type: str
Access: read, write
Example
print(workspace.report.conclusions)
introduction
Optional introduction placed after the index; blank omits the section.
Type: str
Access: read, write
Example
print(workspace.report.introduction)
pages
Every workspace page in tab order with whether the report includes it.
Type: list[ReportPageStatus]
Access: read
Example
included = [s.page for s in workspace.report.pages if s.status == "included"]
subtitle
Optional subtitle shown on the cover below the title.
Type: str
Access: read, write
Example
print(workspace.report.subtitle)
title
Report title, required to export; it also names the Desktop download.
Type: str
Access: read, write
Example
print(workspace.report.title)
Methods
clear
Empty the title, subtitle, introduction and conclusions; the chart theme is kept.
Signature
Report.clear() -> NoneExample
workspace.report.clear()
export
Write the report as a PDF or Word document.
The document matches the Desktop report: a cover, an index, the optional introduction, every plot with a series from the included pages in tab order, interval-statistics and data-label tables, and the optional conclusions.
Signature
Report.export(path: str | Path, *, format: ReportFormat) -> ReportExportResultParameters
| Name | Type | Requirement | Default | Description |
|---|---|---|---|---|
path | str | Path | Required | — | Output file path; relative paths resolve against the current directory. |
format | ReportFormat | Required | — | pdf or docx. |
Exceptions
CommandValidationError: If the format is notpdfordocx.ValidationError: If the report has no title.ExportError: If no included page has a plot with series.
Example
workspace.report.export("study.pdf", format="pdf")
set
Update several report fields at once; omitted fields keep their value.
Signature
Report.set(*, title: str | None = None, subtitle: str | None = None, introduction: str | None = None, conclusions: str | None = None) -> NoneParameters
| Name | Type | Requirement | Default | Description |
|---|---|---|---|---|
title | str | None | Optional | None | Report title. |
subtitle | str | None | Optional | None | Cover subtitle. |
introduction | str | None | Optional | None | Introduction text; line breaks are kept. |
conclusions | str | None | Optional | None | Conclusions text; line breaks are kept. |
Exceptions
CommandValidationError: If a value is not a string.
Example
workspace.report.set(title="Grid study", introduction="Scope")
Related guides
- Create PDF and Word Reports: Fill the report, choose its pages, and export the document.