[]
Core.PageReport
Represents the page report API.
remarks
Use this class to load a report definition or URI and render a PageDocument.
example
const report = new PageReport();
• new PageReport(options?)
Initializes a new instance of the PageReport class.
example
const report = new PageReport({ language: 'en' });
| Name | Type | Description |
|---|---|---|
options? |
Partial<{ animations: Partial<{ charts: Partial<{ highlight: { enabled: boolean } ; onHover: { enabled: boolean } ; onLoad: { enabled: boolean } }> ; table: { onHover: { backgroundColor: string ; enabled: boolean ; textColor?: string } | { enabled: boolean ; textColor: string } } }> ; i18n: i18n ; language: string ; memoizeData: boolean }> |
The PageReport options. |
• get name(): string
Gets the report name.
string
• get reportParameters(): ReportParameters
Gets the report parameters API.
• get resourceLocator(): ResourceLocator
Gets the report resource locator instance.
• get viewSettings(): ViewSettings
ViewSettings
▸ load(report, options?): Promise<void>
Loads a report template from a URI or a report definition.
example
await report.load('report.rdlx-json');
| Name | Type | Description |
|---|---|---|
report |
string | Report |
The report URI or report definition object. |
options? |
Object |
The execution-time settings. |
options.environment? |
Environment |
- |
options.reportParameters? |
{ Name: string ; Value: ParameterVariant[] }[] |
- |
options.resourceLocator? |
Partial<ResourceLocator> |
- |
Promise<void>
A promise that resolves when the report is loaded.
▸ run(logsSubscriber?): Promise<PageDocument>
Starts rendering the report and creates a PageDocument.
Optionally accepts a logs subscriber that will receive rendering logs during the document creation process.
example
const document = await report.run();
// with logs
const document = await report.run((logs, severity) => { console.log(logs, severity); });
| Name | Type | Description |
|---|---|---|
logsSubscriber? |
LoggerSubscriber |
Optional callback for collecting render logs. |
Promise<PageDocument>
A promise that resolves to the rendered document.