Report Parameters Component

Embed parameter forms for user input using the rb-parameters web component.


Table of Contents

Overview

The <rb-parameters> component renders a form with input controls for report parameters. It supports various input types including dates, dropdowns, text inputs, numbers, and checkboxes.

ReportBurster Parameters Component

FlowKraft Apps: The FlowKraft Frontend App has this component pre-configured. Just paste your embed code from the Usage tab—no script setup required. See FlowKraft Frontend App for details.

Basic Usage

<rb-parameters
  report-code="sales-report"
  api-base-url="http://localhost:9090/api/jobman/reporting">
</rb-parameters>

Attributes

AttributeRequiredDescription
report-codeYesReport folder name configured in ReportBurster
api-base-urlYesBase URL for API calls

DSL Configuration

Parameters are defined in ReportBurster using a Groovy DSL.

Basic Structure

reportParameters {
    parameter(id: 'startDate', type: 'LocalDate') {
        constraints(required: true)
        ui(label: 'Start Date')
    }
}

Parameter Properties

PropertyDescriptionExample Values
idUnique identifier'startDate', 'region'
typeData type'LocalDate', 'String', 'Integer'

Supported Types

TypeInput Control
LocalDateDate picker
LocalDateTimeDate/time picker
StringText input or dropdown
IntegerNumber input
BigDecimalDecimal input
BooleanCheckbox

Constraints

parameter(id: 'startDate', type: 'LocalDate') {
    constraints(
        required: true,
        min: '2020-01-01'
    )
}
ConstraintDescription
requiredField is mandatory
minMinimum value/date
maxMaximum value/date

Cross-Field References

Use another parameter's value as a constraint:

reportParameters {
    parameter(id: 'startDate', type: 'LocalDate') {
        constraints(required: true)
        ui(label: 'Start Date')
    }
    parameter(id: 'endDate', type: 'LocalDate') {
        constraints(required: true, min: startDate)
        ui(label: 'End Date')
    }
}

UI Hints

parameter(id: 'region', type: 'String') {
    ui(
        label: 'Region',
        control: 'select',
        options: ['North', 'South', 'East', 'West']
    )
}
UI HintDescription
labelDisplay label
controlInput type ('select', 'input')
optionsDropdown options

Examples

Date Range Filter

reportParameters {
    parameter(id: 'startDate', type: 'LocalDate') {
        constraints(required: true)
        ui(label: 'Start Date')
    }
    parameter(id: 'endDate', type: 'LocalDate') {
        constraints(required: true, min: startDate)
        ui(label: 'End Date')
    }
}

Region Dropdown

reportParameters {
    parameter(id: 'region', type: 'String') {
        ui(
            label: 'Region',
            control: 'select',
            options: ['All Regions', 'North', 'South', 'East', 'West']
        )
    }
}

Combined Filters

reportParameters {
    parameter(id: 'year', type: 'Integer') {
        constraints(required: true, min: 2020, max: 2030)
        ui(label: 'Year')
    }
    parameter(id: 'category', type: 'String') {
        ui(
            label: 'Category',
            control: 'select',
            options: ['Electronics', 'Clothing', 'Food', 'Other']
        )
    }
    parameter(id: 'includeInactive', type: 'Boolean') {
        ui(label: 'Include Inactive')
    }
}