render_report_as_pptx#
- ADR.render_report_as_pptx(*, context: dict | None = None, item_filter: str = '', **kwargs: Any) bytes#
Render a report as a PPTX byte stream.
Only templates of type
PPTXLayoutare supported.- Parameters:
- Returns:
bytesPPTX document bytes (media type
application/vnd.openxmlformats-officedocument.presentationml.presentation).
- Raises:
ADRExceptionIf no keyword arguments are provided or if the template is not of type PPTXLayout or if the report rendering fails.
Examples
>>> from ansys.dynamicreporting.core.serverless import ADR >>> adr = ADR(ansys_installation=r"C:\Program Files\ANSYS Inc\v252", db_directory=r"C:\DBs\docex") >>> adr.setup() >>> pptx_stream = adr.render_report_as_pptx(name="Serverless Simulation Report", item_filter="A|i_tags|cont|dp=dp227;") >>> with open("report.pptx", "wb") as f: ... f.write(pptx_stream)