Page 1 of 1

Variable list - set empty selection as defatult

Posted: Fri Mar 11, 2022 12:48 pm
by tausin
Dear support

I use list variable in my report for filtering report data. But when I want to run report, all items in list are checked. I need to have all items unchecked because nobody use all data and its very slowly. Is it possible?

Re: Variable list - set empty selection as defatult

Posted: Fri Mar 11, 2022 1:09 pm
by Max Shamanov
Hello,

You can use the properties Checked in your variable and set to false.

Thank you.

Re: Variable list - set empty selection as defatult

Posted: Mon Dec 19, 2022 2:31 pm
by rvz
Max Shamanov wrote: Fri Mar 11, 2022 1:09 pm Hello,

You can use the properties Checked in your variable and set to false.

Thank you.
Why this option does not appear for me?
Version 2022.3.4 from 02.08.2022, WPF v2, .NET 4.5.1
Thank you.

Re: Variable list - set empty selection as defatult

Posted: Mon Dec 19, 2022 10:16 pm
by Lech Kulikowski
Hello,

Unfortunately, in the WPF designer, that option is not available.

We have added that task to our to-do list.

Thank you.
#9550

Re: Variable list - set empty selection as defatult

Posted: Tue Dec 20, 2022 8:38 am
by rvz
Lech Kulikowski wrote: Mon Dec 19, 2022 10:16 pm Hello,

Unfortunately, in the WPF designer, that option is not available.

We have added that task to our to-do list.

Thank you.
#9550
Hello,

Thank you for the reply.
I'm wondering, how can I achieve that effect using the code in the events? Is it possible?
I would like to uncheck some items of the list at first rendering.

Thank you!

Re: Variable list - set empty selection as defatult

Posted: Tue Dec 20, 2022 11:38 pm
by Lech Kulikowski
Hello,

You can use the following code:

Code: Select all

report.Dictionary.Variables["Variable1"].DialogInfo = new StiDialogInfo(StiDateTimeType.Date, "", false, "KeyColumn", "LableColumn", "CheckedSource;CheckedCondition", StiVariableSortDirection.Asc, StiVariableSortField.Key);
for example:

Code: Select all

report.Dictionary.Variables["Variable1"].DialogInfo = new StiDialogInfo(StiDateTimeType.Date, "", false, "Categories.CategoryID", "Categories.CategoryName", "Categories;Categories.CategoryID > 5", StiVariableSortDirection.Asc, StiVariableSortField.Key);
Thank you.

Re: Variable list - set empty selection as defatult

Posted: Mon Dec 26, 2022 8:42 am
by Lech Kulikowski
Hello,

That option was added in the WPF designer, and will be available in the next major release.

Thank you.