how to programming checkbox checked

Stimulsoft Reports.NET discussion
Post Reply
nickysuwandi
Posts: 5
Joined: Mon Mar 13, 2023 2:28 am

how to programming checkbox checked

Post by nickysuwandi »

Dear All

I had try to set checked value in checked box

I had put condition in checked property

Code: Select all

{IIF(DtAkJIden.warga="WNA",true,false)}
but i got error

The error of compilation
The error of compilation is found in the 'Checked' property of the 'ChkBoxWarga1' component:
Property or indexer 'Reports.Report.DtAkJIdenDataSource.warga' cannot be assigned to -- it is read only

The error of compilation
The error of compilation is found in the 'Checked' property of the 'ChkBoxWarga1' component:
The best overloaded method match for 'Stimulsoft.Report.StiReport.IIF(bool, object, object)' has some invalid arguments

The error of compilation
The error of compilation is found in the 'Checked' property of the 'ChkBoxWarga1' component:
Argument 1: cannot convert from 'string' to 'bool'
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: how to programming checkbox checked

Post by Lech Kulikowski »

Hello,

Please check the CSharp syntactic, which should be:
{IIF(DtAkJIden.warga=="WNA",true,false)}

Thank you.
nickysuwandi
Posts: 5
Joined: Mon Mar 13, 2023 2:28 am

Re: how to programming checkbox checked

Post by nickysuwandi »

Thanks Lech

It work perfectly
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: how to programming checkbox checked

Post by Lech Kulikowski »

Hello,

You are welcome.
Post Reply