Skip to main content

Constant data source

Types of fixed value

There are several types of constant data source. They all represent a manually entered value, which can be populated by a user when they run the report.

Constant data sources can be used as query parameters within AQS and AQS statistics data sources, so they provide a handy way for users to customise the output of a report.

For example, imagine a custom report about defects. There are various possible ways to filter and sort those defects (e.g. by area, by status, by date). By including several constant data sources that take user input, and configuring an AQS data source to use them as parameters, the user can tailor the report to their requirements.

Create a constant data source

To create a constant data source in the Report Builder:

  1. Open the Data sources tab and select Create data source.

    alt text
  2. Supply a distinct Name. Users see this when running the report, so make sure it describes the data source clearly. To ensure the data source is always populated when running the report, enable Required.

  3. Select Type and choose one of the following:

    TypeDescriptionExampleInput Method
    Alloy IdRepresents an Item ID value5f86c84e2bdc0600696cddb7Type into the field
    DateRepresents a date value11 May 2022Select a value with the calendar picker
    Date TimeRepresents a date and time value2 July 2022 13:30:00Select a value with the calendar picker
    GeometryRepresents geometry coordinates in GeoJSON formatDraw points, lines or polygons using the Geometry Editor
    NumberRepresents a number value314Type into the field
    SeasonalRepresents a seasonal value (a date without a year)25th DecemberSelect a value with the calendar picker
    TextRepresents a text valueHello world!Type into the field
    TimeRepresents a time value14:20:00Select a value with the calendar picker
    Yes/NoRepresents a boolean valueYes or NoChoose an option
  4. Consider setting an appropriate Default value if possible. This helps to ensure your report always runs successfully. Users can still change the value when running the report.

  5. If Type is set to Alloy Id and your report is intended to be run from an item, the data source can be populated automatically with that item's ID. Select the Tags field, set the Incoming item id tag and select Save.

    Details
    alt text
  6. Select Create to finish.

Customise sorting and headers

To configure these optional fields, edit the data source after creating it:

Use as a query parameter

For information about using a constant data source as a query parameter, see: