IIF use AND OR logical operators
Hello, can I use logical operators AND, OR in IIF fuction?
[IIf(([SumaOZPLCZ06Curr] > 0 and [SumaOZ_PL_CZ_06_Last] > 0), 1 ,0)]
not working.
This discussion has been closed.
Hello, can I use logical operators AND, OR in IIF fuction?
[IIf(([SumaOZPLCZ06Curr] > 0 and [SumaOZ_PL_CZ_06_Last] > 0), 1 ,0)]
not working.
Comments
Hello!
In FastReport .NET, C# is selected as the default scripting language; therefore, within IIf() expressions, the C# operators && and || are used, rather than the keywords ‘and’ and ‘or’ (the words ‘And’ and ‘Or’ are only permitted when ScriptLanguage="Vb").
A working example for the C# template:
[IIf([SumaOZPLCZ06Curr] > 0 && [SumaOZ_PL_CZ_06_Last] > 0, 1, 0)]