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 -
GroupSort
GroupSortType
(optional) - group column sorting, only relevant for column with Group enabled, default is Asc (since 2022-11.001) -
Total
TotalType
(optional) - relevant only for num column type. -
Precision
PrecisionType
(optional) - relevant only for num column type, sets rounding precision (since 2023-01.001)
Type: ColumnType
string
value with bellow restrictions
- text - Text column
- num - Numeric column
- time - Time
- date - Date (ISO Format)
Type: GroupSortType
string
value with bellow restrictions
- Asc - Ascending sorting
- Desc - Descending sorting
Type: TotalType
string
value with bellow restrictions
- Sum - Calculate sum of rows
- Avg - Calculate average value
Type: PrecisionType
integer
within range 0 - 10 - specifies number of decimal digits
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
- 10 - HTML - render content as HTML (since 2022-11.001)
Type: ReportRow
-
Values array of
string
orinteger
ordecimal
ordate
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": 1
},
{
"Name": "Description",
"Type": "text",
"Width": 40,
"WrapStyle": 1
},
{
"Name": "Environment",
"Type": "text",
"Width": 40,
"WrapStyle": 1
},
{
"Name": "Hours",
"Type": "num",
"Width": 40,
"WrapStyle": 1,
"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
};