Question regarding the use of IIF

Stimulsoft Reports.WPF discussion
Post Reply
User avatar
PJoyeux
Posts: 160
Joined: Tue Nov 26, 2013 9:40 am
Location: Germany

Question regarding the use of IIF

Post by PJoyeux »

Hi,

imagine a textfield with the following content:

Code: Select all

{IIF(MyBusinesObject.PropertyOne > 0, "Some Text {MyBusinesObject.PropertyTwo} Some more text", null)}
The problem now, is that "{MyBusinesObject.PropertyTwo}" doesn't get interpreted anymore. Instead of the actual value of "PropertyTwo" it is the formula "{MyBusinesObject.PropertyTwo}" that appears at runtime...

How can I use variables and/or Businessobjects WITHIN an IIF-construct?

Cheers,
Pascal
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Question regarding the use of IIF

Post by HighAley »

Hello.

You should use next code:
{IIF(MyBusinesObject.PropertyOne > 0, "Some Text "+MyBusinesObject.PropertyTwo+" Some more text", null)}
Thank you.
User avatar
PJoyeux
Posts: 160
Joined: Tue Nov 26, 2013 9:40 am
Location: Germany

Re: Question regarding the use of IIF

Post by PJoyeux »

Aleksey Andreyanov wrote:Hello.

You should use next code:
{IIF(MyBusinesObject.PropertyOne > 0, "Some Text "+MyBusinesObject.PropertyTwo+" Some more text", null)}
Thank you.
Aaahhh... Ok, thank you!

Cheers,
Pascal
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Question regarding the use of IIF

Post by HighAley »

Hello.

We are always glad to help you.
Do not hesitate to contact us in future.

Thank you.
Post Reply