Formatting a textbox with IFF

Stimulsoft Reports.NET discussion
Post Reply
erbeynam
Posts: 7
Joined: Fri Jan 25, 2013 1:27 am

Formatting a textbox with IFF

Post by erbeynam »

If a Boolean value is true, I want to show something, and if false something else.

This works for a label :

{IIF(IsTrue,"ZZA","ZZ1")}

This was working for a count before :

{CountIf(Data, MasterDS.Status_Code == "ZZA")}

Now combine these and it doesn’t work :

IFF(IsTrue, {CountIf(Data, MasterDS.Status_Code == "ZZA")}, {CountIf(Data, MasterDS.Status_Code == "ZZ1")})
Shows “IFF(IsTrue, 10, 0)

{IFF(IsTrue, {CountIf(Data, MasterDS.Status_Code == "ZZA")}, {CountIf(Data, MasterDS.Status_Code == "ZZ1")})}
The error of compilation
The error of compilation is found in the 'Report' report:
} expected

{IFF(IsTrue, CountIf(Data, MasterDS.Status_Code == "ZZA"), CountIf(Data, MasterDS.Status_Code == "ZZ1"))}
The error of compilation
The error of compilation is found in the 'Report' report:
The name 'IFF' does not exist in the current context
erbeynam
Posts: 7
Joined: Fri Jan 25, 2013 1:27 am

Re: Formatting a textbox with IFF

Post by erbeynam »

Got it.
{IIF(IsTrue,(CountIf(Data, MasterDS.Status_Code == "ZZA")),(CountIf(Data, MasterDS.Status_Code == "ZZ1")))}
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Formatting a textbox with IFF

Post by Alex K. »

Hello,

Let us know if you need any additional help.
Post Reply