Set checked state of checkbox based on contains/like

Jump to: Board index.NET FrameworkStimulsoft Reports.Net

Stimulsoft Reports.Net discussion

Set checked state of checkbox based on contains/like

Post Tue Feb 13, 2018 3:51 pm

I have a table component with a field set as checkbox and want to set the checked state of this checkbox based on an if condition.
If I would have written this in SQL Server I'd do it in this way:

IF ds2.Aardrailsysteem LIKE '%Hoofd aardrail%'
BEGIN
RETURN TRUE
END
ELSE
BEGIN
RETURN FALSE
END

Would it be possible to do it in such a way?
{IIF ds2.Aardrailsysteem LIKE '%Hoofd aardrail%', true, false}

I'm curious how I should handle LIKE or contains for the checkbox in Stimulsoft
Attachments
TableImage2.png
Properties of checkbox
TableImage2.png (11.05 KiB) Viewed 91 times
TableImage1.png
Table component
TableImage1.png (7.22 KiB) Viewed 91 times
rickz
 
Posts: 1
Joined: Tue Feb 13, 2018 3:33 pm

Re: Set checked state of checkbox based on contains/like

Post Wed Feb 14, 2018 9:15 am

Hello,

You can use the following expression:
Code: Select all
{IIF(Categories.CategoryName.Contains("Prod"), true, false)}

Thank you.
Attachments
Capture.PNG
Capture.PNG (75.34 KiB) Viewed 87 times
Alex K.
 
Posts: 6476
Joined: Thu Jul 29, 2010 2:37 am


Return to Stimulsoft Reports.Net

Who is online

Users browsing this forum: No registered users and 2 guests