Page 1 of 1

Boolen IIF Condition doesn´t works

Posted: Sat Dec 17, 2022 4:57 pm
by _Andy!
Hello,

i have following problem:

Code: Select all

IIF(Result.PaymentMethodSL_dynPaymentMethod ==True,Format("{0:dd.MM.yyyy}",Result.InvoicePaymentSL_CDDate),Format("{0:dd.MM.yyyy}",Result.RPTransactions_CDDueDate)
Check of the formula editor is "OK!"
In the result of the report following error message will be shown:
Umwandlungsfehler
Der Kompilierungsfehler wurde in der Eigenschaft 'Text' der Komponente 'Text1' gefunden:
Der Name 'True' ist im aktuellen Kontext nicht vorhanden.
The field PaymentMethodSL_dynPaymentMethod is a BOOLEAN field. How can i set the if condition for boolean fields? Thank you in advance.

Re: Boolen IIF Condition doesn´t works

Posted: Sun Dec 18, 2022 11:31 pm
by Lech Kulikowski
Hello,

Please try to check the following expression:
IIF(Result.PaymentMethodSL_dynPaymentMethod == true, Format("{0:dd.MM.yyyy}", Result.InvoicePaymentSL_CDDate), Format("{0:dd.MM.yyyy}",Result.RPTransactions_CDDueDate))

Thank you.

Re: Boolen IIF Condition doesn´t works

Posted: Mon Dec 19, 2022 7:15 am
by _Andy!
Hello, with this formula it works.
Thank you.

Re: Boolen IIF Condition doesn´t works

Posted: Mon Dec 19, 2022 7:46 am
by Lech Kulikowski
Hello,

You are welcome.