ConvertToBoolean
  • 04 May 2024
  • 1 Minute to read
  • Dark
    Light

ConvertToBoolean

  • Dark
    Light

Article summary

General

The ConvertToBoolean function can be used to convert a value to a Boolean (true/false).

NOTE

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 Function Syntax

ConvertToBoolean(<value>)

Examples

The following Expression returns the value of the variable vTest of Datasource MyDatasource as a boolean:

ConvertToBoolean Function Example

ConvertToBoolean([Datasource].[MyDatasources].[Variable].[vTest])

If the variable contains the value 0 then the returned value will be false.


Was this article helpful?

What's Next