Wennie
Wennie

Reputation: 171

How to use IIF function in FastReports?

I have a field that contains an integer value (1 or 0 only), if the field contains 0 I want to print 'Male' in my report; if it's 1, then print 'Female'.

This is what I have done so far and it doesn't work:

[IIF(<ReportPersonal."civilStatus"> = 0, 'Male', 'Female')]

That code always prints 'Male' though the value of the civilStatus field is '1'.

Here is the Link to the report file

Advanced thanks to our experts.

Upvotes: 3

Views: 21953

Answers (2)

Allal SALMA
Allal SALMA

Reputation: 11

[IIF(<ReportPersonal."civilStatus"> = True, 'Male', 'Female')]

Upvotes: 1

Val Marinov
Val Marinov

Reputation: 2755

In MemoView "ReportPersonalcivilStatus" has :

DisplayFormat.FormatStr="False,True" DisplayFormat.Kind="fkBoolean". 

Try to set Memo - > Format to Text(no formating).

Upvotes: 2

Related Questions