What is a report?

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

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.

Configuration

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.

Example schema

{
    "type": "Report",
    "options": {
        "report_title": "The report",
        "report_byline": "Yet another byline",
        "version_number": "0.1b",
        "logo_url": "https://hybiscus.dev/public/public/docs/Wordmark.svg"
    },
    "config": {
        "n_pages": 1,
        "palette": "default",
        "typography": "default"
    },
    "components": []
}

Options

The following options can be specified in the options object:

KeyDescription
options.report_titleThe title of the report which appears at the top.
options.logo_urlURL 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_bylineA smaller byline which appears underneath the report title.
options.version_numberOptional. A version number which can be placed on the report.
config.colour_themeOptional. The colour palette theme to apply to the report. See Themes for more details.
config.typography_themeOptional. The typography theme to apply to the report. See Themes for more details.
config.n_pagesOptional. The number of pages expected in your report. Please note the Free trial only supports single-page PDF reports.
config.enable_paginationOptional. Enables pagination at the bottom of the pages. Only applicable to multi-page PDF reports. Defaults to false.
config.cloud_storage.s3Optional. 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_storageOptional. 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_storageOptional. 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.
componentsThe list of components to add to the report.

Custom logo

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.

Cloud storage upload

For more details on uploading your PDF report directly to a cloud storage provider, see here.

Multi-page PDF reports

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.

For multi-page PDF reports, you can also enable pagination at the bottom using the config.enable_pagination option.

Missing something?

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