flow360.report.ReportTemplate#

class ReportTemplate#

Bases: Flow360BaseModel

A model representing a report containing various components such as summaries, inputs, tables, and charts in both 2D and 3D.

title: str | None = None#

Title of report, shown on the first page.

items: List[Annotated[Summary | Inputs | Table | NonlinearResiduals | Chart2D | Chart3D, FieldInfo(annotation=NoneType, required=True, discriminator='type_name')]] [Required]#

A list of report items, each of which can be a summary, input data, table, 2D chart, or 3D chart.

include_case_by_case: bool = False#

Flag indicating whether to include a case-by-case analysis in the report.

settings: Settings | None = Settings(dpi=300, dump_table_csv=False)#
get_requirements()#

Collects and returns unique requirements from all items.

This method iterates over all items, retrieves each item’s requirements, and aggregates them into a unique list.

Returns:

A list of unique requirements aggregated from all items.

Return type:

list

create_in_cloud(name, cases, landscape=False, solver_version=None)#

Creates a report in the cloud for a specified set of cases.

Parameters:
  • name (str) – The name of the report to create.

  • cases (list[Case]) – A list of Case instances to include in the report.

  • landscape (bool, default=False) – Orientation of the report, where True represents landscape.

  • solver_version (str, optional) – Version of the solver for report generation.

Returns:

The response from the Report API submission.

Return type:

Response

create_pdf(filename, cases, landscape=True, data_storage='.', shutter_url=None, shutter_access_token=None, shutter_screenshot_process_function=None, process_screenshot_in_parallel=True)#

Generates a PDF report for a specified set of cases.

Parameters:
  • filename (str) – The name of the output PDF file.

  • cases (list[Case]) – A list of Case instances to include in the PDF report.

  • landscape (bool, default=False) – Orientation of the report, where True represents landscape.

  • data_storage (str, default=".") – Directory where the PDF file will be saved.

  • shutter_url (str)

  • shutter_access_token (str)

  • shutter_screenshot_process_function (Callable)

  • process_screenshot_in_parallel (bool)

Return type:

None