Set checked items in a variable

Stimulsoft Reports.NET discussion
Post Reply
terricide
Posts: 14
Joined: Mon Oct 15, 2012 5:45 pm

Set checked items in a variable

Post by terricide »

Hi
I've created a variable that is binded to two columns in my database.
My variable is stored as an IntList.
The problem I am having is that when the report first launches every item in the list is checked.
I want to default the list to nothing checked? Is that possible?

I've been trying to use reflection to do this in the load event and/or the Page1.AfterPrint event

var type = stiReport.CompiledReport.GetType();
var prop = type.GetField("PowerPolicyList");
prop.SetValue(stiReport.CompiledReport, new IntList());

or

var type = stiReport.CompiledReport.GetType();
var prop = type.GetField("PowerPolicyList");
var list = prop.GetValue(stiReport.CompiledReport) as IntList;
list.Clear();

Any ideas?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Set checked items in a variable

Post by HighAley »

Hello.

Could you send us a sample project which reproduces your issue?

Thank you.
DavidLee82
Posts: 11
Joined: Wed Jul 03, 2024 12:52 am

Re: Set checked items in a variable

Post by DavidLee82 »

I am having the same issue.

Upon preview or load everything is checked by default. I would like it so nothing is checked by default on load. Can you please add an option to change the behavior of this?
Lech Kulikowski
Posts: 7333
Joined: Tue Mar 20, 2018 5:34 am

Re: Set checked items in a variable

Post by Lech Kulikowski »

Hello,

You ca use the Checked property for the Variable.

Thank you.
Post Reply