Using enumerations as parameters in reports

Some objects have enumeration properties. For example, the TaskBase object (task base class) has such enumerations as Priority and Task Status.

To use enumerations as parameters, you need to:

  1. Add a parameter of the required type.
  2. Specify a condition for each element in the query.

For example, the Priority enumeration looks like this:

Each element must be checked separately, like this:

{if {$ParameterName} = ‘Name’}
EnumerationProperty = Value
{end if}

For example:

select *
from TaskBase tb
{if {$TaskPriority} = ’High’}
where tb.TaskPriority = 1
{end if}
{if {$TaskPriority} = ’Medium’}
and tb.TaskPriority = 2
{end if}
{if {$TaskPriority} = ’Low’}
and tb.TaskPriority = 3
{end if}

To learn more about creating reports, read this and this articles.