Supported data types
MariaDB / MySQL
The following data types are supported as user report parameters and in the report's select columns.
| Numeric | Date and time | Character |
|---|---|---|
| tinyint | timestamp | char |
| smallint | date | varchar |
| int | time | tinyblob (*) |
| mediumint | datetime | mediumblob (*) |
| bigint | longblob (*) | |
| float | blob (*) | |
| double | tinytext | |
| decimal | mediumtext | |
| year | longtext | |
| text | ||
| json |
Time data type can be used as normal time or as a duration.
When used as regular time, the column is formatted based on the format defined in the preferences. Normal time has a range of 00:00:00 - 23:59:59.
If you apply a style '%s' to a time column or use aggregate function sum or avg, the time column is then treated as duration, and the format is always H:M:S.
(*) For text data
Microsoft SQL Server, SAP ASE
| Numeric | Date and time | Character |
|---|---|---|
| bit | smalldatetime | char |
| tinyint | datetime | nchar |
| smallint | date (*) | varchar |
| int | time (*) | nvarchar |
| bigint | datetime2 (*) (**) | text |
| float | datetimeoffset (*) | ntext |
| decimal | sysname | |
| numeric | ||
| real | ||
| smallmoney | ||
| money |
(*) For SQL Server 2008 and newer.
(**) Not supported in SAP ASE
Note that older TDS protocol versions do report not identify date data types correctly. Use ':type=date' notation in column name to specify the correct data type.
declare @d date
declare @dt datetime2
declare @time time
declare @datetimeoffset datetimeoffset
select @d = getdate(), @dt = getdate(), @time = getdate(), @datetimeoffset = getdate()
select @d as 'date:type=date',
@dt as 'datetime2:type=datetime',
@time as 'time:type=time',
@datetimeoffset as 'datetimeoffset:type=datetime'