Reports

Report properties attached to a ConfigurationBuilder control how scenario outputs are exported.

ReportProperty — export-time configuration for one report.

class ReportProperty(export_format, export_interface_key=None)[source]

Export configuration for a single report.

Register on a ConfigurationBuilder via add_report_property(); chain set_* methods to customise visibility and behaviour.

Parameters:
  • export_format (ReportExportFormat) – ReportExportFormat (e.g. XLSX, CSV).

  • export_interface_key (str | None) – Optional key identifying the export interface template; used as a fallback display name.

set_report_data(report_data)[source]

Attach ReportData describing the rows that feed this report.

Return type:

ReportProperty

set_file_name_key(file_name_key)[source]

Set the key of the model parameter supplying the export file name.

Return type:

ReportProperty

set_order_index(order_index)[source]

Set the position of this report in the navigator.

Return type:

ReportProperty

set_export_csv(export_csv)[source]

Also export this report as CSV alongside its primary format.

Return type:

ReportProperty

set_visible_on_navigator(visible_on_navigator)[source]

Show this report in the side navigator.

Return type:

ReportProperty

set_name(name)[source]

Set the display name; falls back to export_interface_key when unset.

Return type:

ReportProperty

set_show_in_menu(show_in_menu)[source]

Show this report in the export menu.

Return type:

ReportProperty

set_advanced_user(advanced_user)[source]

Restrict this report to advanced users.

Return type:

ReportProperty

report_name()[source]

Return the display name, falling back to export_interface_key if unset.

Return type:

str | None

ReportData — sheet/feature prerequisites for a ReportProperty.

class ReportData(required_sheets=None, requires_monte_carlo=False, requires_scenario_comparison=False)[source]

Sheet and feature prerequisites for one report.

Parameters:
  • required_sheets (set[str] | None) – Sheet names that must be present for the report to run.

  • requires_monte_carlo (bool) – Whether the report depends on Monte Carlo output.

  • requires_scenario_comparison (bool) – Whether the report depends on scenario comparison output.

build()[source]

Serialise to a JSON-compatible dict (the required-sheets set becomes a list).

Return type:

dict[str, Any]

ReportExportFormat — file format for a ReportProperty export.

class ReportExportFormat(*values)[source]

File format produced when a report is exported.

XLSX = 'XLSX'
CSV = 'CSV'
JSON = 'JSON'
MSDOS = 'MSDOS'