enable image when a column be true

Stimulsoft Dashboards.WIN discussion
Post Reply
pouyan4938
Posts: 10
Joined: Sun Apr 25, 2021 9:24 am

enable image when a column be true

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

Re: enable image when a column be true

Post by Lech Kulikowski »

Hello,

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

Thank you.
Post Reply