Boolen IIF Condition doesn´t works

Stimulsoft Reports.NET discussion
Post Reply
_Andy!
Posts: 8
Joined: Sat Dec 17, 2022 4:49 pm

Boolen IIF Condition doesn´t works

Post 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.
Lech Kulikowski
Posts: 7334
Joined: Tue Mar 20, 2018 5:34 am

Re: Boolen IIF Condition doesn´t works

Post 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.
_Andy!
Posts: 8
Joined: Sat Dec 17, 2022 4:49 pm

Re: Boolen IIF Condition doesn´t works

Post by _Andy! »

Hello, with this formula it works.
Thank you.
Lech Kulikowski
Posts: 7334
Joined: Tue Mar 20, 2018 5:34 am

Re: Boolen IIF Condition doesn´t works

Post by Lech Kulikowski »

Hello,

You are welcome.
Post Reply