Variable list - set empty selection as defatult

Stimulsoft Dashboards.WEB discussion
Post Reply
tausin
Posts: 6
Joined: Mon Mar 07, 2022 1:44 pm

Variable list - set empty selection as defatult

Post 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?
Attachments
picture.png
picture.png (51.75 KiB) Viewed 15353 times
Max Shamanov
Posts: 850
Joined: Tue Sep 07, 2021 10:11 am

Re: Variable list - set empty selection as defatult

Post by Max Shamanov »

Hello,

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

Thank you.
Attachments
Designer_ABESmEVACr.png
Designer_ABESmEVACr.png (102.39 KiB) Viewed 15346 times
rvz
Posts: 3
Joined: Mon Dec 19, 2022 2:28 pm

Re: Variable list - set empty selection as defatult

Post 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.
Attachments
2022-12-19_143450.png
2022-12-19_143450.png (8.64 KiB) Viewed 15128 times
Last edited by rvz on Mon Dec 19, 2022 2:36 pm, edited 1 time in total.
Lech Kulikowski
Posts: 6651
Joined: Tue Mar 20, 2018 5:34 am

Re: Variable list - set empty selection as defatult

Post 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
rvz
Posts: 3
Joined: Mon Dec 19, 2022 2:28 pm

Re: Variable list - set empty selection as defatult

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

Re: Variable list - set empty selection as defatult

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

Re: Variable list - set empty selection as defatult

Post by Lech Kulikowski »

Hello,

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

Thank you.
rvz
Posts: 3
Joined: Mon Dec 19, 2022 2:28 pm

Re: Variable list - set empty selection as defatult

Post by rvz »

Hello,

Thank you very much for continually improving your product.
I have been successfully using this feature in WPF since the update.
However, I am facing an issue that I can't seem to resolve.

When I use a static StringList, everything works fine.
I can specify an expression to dynamically check the items.
However, when it comes to the "Dependent Value" option, the checking expression does not seem to work, leaving all filtered items as checked.
Is this a bug or is it supposed to work this way?
How can I dynamically check/uncheck items of filtered StringLists using code in events? Perhaps in the BeginRender event?

Thank you.
Lech Kulikowski
Posts: 6651
Joined: Tue Mar 20, 2018 5:34 am

Re: Variable list - set empty selection as defatult

Post by Lech Kulikowski »

Hello,

> However, when it comes to the "Dependent Value" option, the checking expression does not seem to work, leaving all filtered items as checked.

It is not working for dependent variables.

> How can I dynamically check/uncheck items of filtered StringLists using code in events? Perhaps in the BeginRender event?

No.

Thank you.
Post Reply