Logical Functions in Finished Reports

Cory Fifield -

Basic Syntax - Iif Functions

Syntax:        Iif: Iif(FirstClause, FirstClauseTrueValue, ..., LastClause, LastClauseTrueValue, FalseValue)
Example 1: Iif(?ViewParameter_FilterBy = 'Contact Name', [ContactName], [City]
Example 2: Iif(?ViewParameter_FilterBy = 'Contact Name'
, [ContactName],
Iif(?ViewParameter_FilterBy = 'City', [City], [OrderID])

Iif function being used in the expression

First argument being tested for True or False

The value that will be used if the FirstClause is True

Second argument being tested for True or False

The value that will be used if the SecondClause is true

The value that will be used if no arguments are True (Else)

 

It can help to read the Iif function as the following...
If (the FilterBy Parameter equals Contact Name, then ContactName field, Else City field)

or

If(the FilterBy Parameter equals Contact Name, then ContactName field, If(the FilterBy parameter equals City, then City fieldElse OrderID field )

 

Have more questions? Submit a request

Comments