A Report
, in Hybiscus terms, is a collection of components defined through
the schema. For a quick example, refer to the Creating a report
section, where you can see a report is simply a schema in which you add a number
of components that populate your report.
Components are the various elements that make up your report, such as images, tables, cards, sections, etc. They are also defined through a simple schema, which you add as a series of objects to your report schema.
The Report
schema takes two configuration keys, options
and
config
. The options
key is an object which specifies content for some of
the fields in the report. The config
key is another object for specifying
various configuration parameters.
{
"type": "Report",
"options": {
"report_title": "The report",
"report_byline": "Yet another byline",
"version_number": "0.1b",
"logo_url": "https://hybiscus.dev/public/img/Wordmark.svg"
},
"config": {
"n_pages": 1,
"palette": "default",
"typography": "default"
},
"components": [...]
}
The following options can be specified in the options
object:
Key | Description |
---|---|
options.report_title |
The title of the report which appears at the top. |
options.logo_url |
URL to an image to use as a logo in place of the report title. Please note this is only supported on premium plans. See here for more details. |
options.report_byline |
A smaller byline which appears underneath the report title. |
options.version_number |
Optional. A version number which can be placed on the report. |
config.colour_theme |
Optional. The colour palette theme to apply to the report. See Themes for more details. |
config.typography_theme |
Optional. The typography theme to apply to the report. See Themes for more details. |
config.n_pages |
Optional. The number of pages expected in your report. Please note the Free trial only supports single-page PDF reports. |
config.cloud_storage.s3 |
Optional. Pre-signed AWS S3 URL for uploading PDF directly to. Please note this is only supported on premium plans. See here for more details. |
config.cloud_storage.azure_blob_storage |
Optional. Pre-signed Azure Blob Storage URL for uploading PDF directly to. Please note this is only supported on premium plans. See here for more details. |
config.cloud_storage.google_cloud_storage |
Optional. Pre-signed Google Cloud Storage URL for uploading PDF directly to. Please note this is only supported on premium plans. See here for more details. |
components |
The list of components to add to the report. |
The report title text can be replaced with a custom logo, that is provided
by a publically accessible URL. This URL should point towards an image of format JPG,
PNG, or SVG. When the options.logo_url
key is set, the options.report_title
option is ignored.
Setting a custom logo is only supported in the Startup and Enterprise plan. See here for more details.
For more details on uploading your PDF report directly to a cloud storage provider, see here.
In cases where you need to add more components than can span a single page,
you will need to change the value of config.n_pages
to greater than 1. To
generate multi-page PDF reports, you will need a premium plan.
Hybiscus is continuously improving and adding new features. If you think we are missing a critical feature, please do not hesitate to contact us and offer your feedback at info@hybiscus.dev