Skip to content

OutputFormat Conditional

This conditional is evaluated based on the requested output format of the current report render process.

Schema

key type required description
type string required A string defining the type of conditional as outputFormat.
operator string required A string that defines the comparison operation to perform. Valid values are isEqual, isNotEqual, oneOf and notOneOf.
string string required The string that will be used when evaluating the conditional. If the operator is oneOf or notOneOf this value should be a comma separated list of strings. Current valid outputFormat values are PDF, CSV, Image, and Excel.

Example

The following example shows how to skip rendering a component when the desired outputFormat is PDF.

{
    "type": "Text",
    "text": "Text sample not for PDF",
    "condition": {
        "type": "outputFormat",
        "operator": "isNotEqual",
        "string": "PDF"
    }
}

This example shows how to render a component only when the desired outputFormat is CSV or Excel.

{
    "type": "Text",
    "text": "Text sample only for CSV and Excel",
    "condition": {
        "type": "outputFormat",
        "operator": "oneOf",
        "string": "CSV, Excel"
    }
}