Reports generation
Availability table
Module |
Available |
|---|---|
reports controller
Library to generate reports.
- reports.generate(generator: string, name: string, language: string, country: string)
Generate a report by using a pre configured generator that will automatically retrieve the necessary data.
- Arguments:
generator
name
language
country
- Returns:
An object with attribute :
success (boolean) Indicates whether the operation was successful.
message (string) Contains additional information about the operation’s success or failure.
content (object) Data returned from a successful request.
contentis an object that contains:template (string) id of the template of this report.
report (string) If generated report is a pdf, this contains the pdf represented as a base64 string
parsed (string) represent the parsed template (after FTL execution) as a base64 string
name (string) name of the report
format (string) format of the report (pdf, csv, html, plain)
- reports.generate(template: string, name: string, language: string, country: string, data: object)
Generate a report by using a template and by passing the report data as a parameter.
- Arguments:
template – Item ID of the template.ospp.
name – Name of the generated report
language – Language of the report. Combined with country to define localization
country – Country of the report. Combined with language to define localization
data – Context given to the report for the FTL template
- Returns:
An object with attribute :
success (boolean) Indicates whether the operation was successful.
message (string) Contains additional information about the operation’s success or failure.
content (object) Data returned from a successful request.
contentis an object that contains:template (string) id of the template of this report.
report (string) If generated report is a pdf, this contains the pdf represented as a base64 string
parsed (string) represent the parsed template (after FTL execution) as a base64 string
name (string) name of the report
format (string) format of the report (pdf, csv, html, plain)