External Report

Since Xeelo 2022-08.001 we introduced External Reports. Regular reports were extended by possibility to use external data source.

In order to setup external report, you must first have external data source (HTTP Server) and also setup external report in Xeelo Admin.

External data source (HTTP endpoint) must provide JSON data in following format

Types

Type: Report

  • Columns - array of ReportColumn
  • Data - array of ReportData
  • AllowRecalculate - boolean - When se to true frontend will render reload/recalculate button
  • Layout - Layout type

Type: Layout

integer with value below restrictions:

  • 0 - Simplified - report is rendered simple HTML table
  • 1 - Extended - report is rendered as rich table with much more features (like client filtering, sorting, column grouping, totals / sub-totals)

Type: ReportColumn

Column definition

  • Name string - Name of column, rendered in column header
  • Type ColumnType - Type of column
  • Width integer (optional) with value restrictions between 0 - 100
  • WrapStyle WrapStyle (optional)
  • Group boolean (optional) - enable column grouping. If enabled, grouped column must be the first one
  • Total TotalType (optinal) - relevant only for num column type.

Type: ColumnType

string value with bellow restrictions

  • text - Text column
  • num - Numeric column
  • time - Time
  • date - Date (ISO Format)

Type: TotalType

string value with bellow restrictions

  • Sum - Calculate sum of rows
  • Avg - Calculate average value

Type: WrapStyle

integer value with bellow restrictions:

  • 1 - Wrap - Wrap cell value if does not fit
  • 2 - No Wrap - Do not wrap cell value if does not fit
  • 3 - Shorten - Shorted cell value if does not fit
  • 9 - Web link - render value as web link href

Type: ReportRow

  • Values array of string or integer or decimal or date

Value on given index must match ColumnType

Length of columns MUST match Values length of each ReportRow

Example

{
  "Columns": [
    { "Name": "Ticket", "Type": "text", "Width": 20, "WrapStyle": 0 },
    { "Name": "Description", "Type": "text", "Width": 40, "WrapStyle": 0 },
    { "Name": "Environment", "Type": "text", "Width": 40, "WrapStyle": 0 }
    { "Name": "Hours", "Type": "num", "Width": 40, "WrapStyle": 0, "Total": "Sum" }
  ],
  "Data": [
    { "Values": ["XI03847", "Czech post API Connector", "None", 10] },
    {
      "Values": [
        "XI03851",
        "DEX: Integration of user information from Azure active directory (New DEX connector)",
        "None",
        10,
      ]
    }
  ],
  "Layout": 1,
  "AllowRecalculate": true
}
1 Like