get_report_component#

Report.get_report_component(prefix: str = '', filter: str = '', style_path: str = '', width: int = 1000, height: int = 800) str#

A HTML code of the web component for report fetching. By default, the web component uses iframe to embed the report. If users have provided additional configuration settings on their application server or on another proxy server, the web component will use fetch API to embed the report directly in the application.

Parameters:
prefixstr, optional

A user defined key in the server to reroute and fetch the report from ADR server. If not provided, the web component will use the default iframe to embed the report in the application.

filterstr, optional

Query string for filtering. The default is "". The syntax corresponds to the syntax for Ansys Dynamic Reporting. For more information, see _Query Expressions in the documentation for Ansys Dynamic Reporting.

style_path: str, optional

The hosting app’s stylesheet path. The default is "". The syntax is used to overwrite report styling using an external CSS file.

widthint, optional

Width of the iframe if the web component uses <iframe> to embed report. The default is 1000.

heightint, optional

Height of the iframe if the web component uses <iframe> to embed report. The default is 800.

Returns:
str

The web component HTML code (as string) that will get embedded in the HTML page

Examples

import ansys.dynamicreporting.core as adr
adr_service = adr.Service(ansys_installation = r'C:\Program Files\ANSYS Inc\v232')
ret = adr_service.connect()
my_report = adr_service.get_report(report_name = 'Top report')
my_report.get_report_component()