Page 1 of 1

enable image when a column be true

Posted: Sun May 02, 2021 5:44 am
by pouyan4938
Hi.
i have some fields which contain 0,1 .
i have a image in my report which i want that be enable when my column be 1 and when my column was 0 my image be hide.
i write this code in before print event of my data band but when i try to run this report in my program give this error.

Code: Select all

Image2.Enabled=IIF(winnerlist.win1==1,true,false);
my error:

Code: Select all

System.Exception: 'c:\Users\pouya\AppData\Local\Temp\fpb3gl42.0.cs(385,28) : error CS0266: Cannot implicitly convert type 'object' to 'bool'. An explicit conversion exists (are you missing a cast?)'
and lastly i assigned my image just want it be show or hide.

Re: enable image when a column be true

Posted: Tue May 04, 2021 7:04 am
by Lech Kulikowski
Hello,

You can use the Condition with the "Component Is Enabled" option for that task.

Thank you.