- 04 May 2024
- 1 Minute to read
- DarkLight
ConvertToBoolean
- Updated on 04 May 2024
- 1 Minute to read
- DarkLight
General
The ConvertToBoolean function can be used to convert a value to a Boolean (true/false).
If the value cannot be converted to a boolean (e.g. when trying to convert the String "This is a text" to a boolean), the execution of the report document preview or task will fail.
Syntax
The syntax of the ConvertToBoolean function is:
ConvertToBoolean(<value>)
Examples
The following Expression returns the value of the variable vTest of Datasource MyDatasource as a boolean:
ConvertToBoolean([Datasource].[MyDatasources].[Variable].[vTest])
If the variable contains the value 0 then the returned value will be false.