Get the Value of a dictionary in the Stimulsoft-Designer

Stimulsoft Dashboards.WEB discussion
Post Reply
Xemaren
Posts: 2
Joined: Thu Jan 05, 2023 4:54 pm

Get the Value of a dictionary in the Stimulsoft-Designer

Post by Xemaren »

Hello,

I am trying to access the value of a Dictionary<Guid, myObject> in the Stimulsoft-Web-Designer but the value is always shown empty.

public class myObject {

public Guid Id { get; set;}
public string Name { get; set;}
public int Age { get; set;}
...
}

Is it possible to even synchronize a Dictionary in Stimulsoft or is it just not possible?
Lech Kulikowski
Posts: 6244
Joined: Tue Mar 20, 2018 5:34 am

Re: Get the Value of a dictionary in the Stimulsoft-Designer

Post by Lech Kulikowski »

Hello,

Do you use reports or dashboards? In the report, you can register your data as business objects:
report.RegBusinessObjects("MyData", object);
report.Dictionary.SynchronizeBusinessObjects();

In dashboards, business objects are not supported. You can register your data as DataSet:
report.RegData("MyData", object.ToDataSet());
report.Dictionary.Synchronize();

Thank you.
Xemaren
Posts: 2
Joined: Thu Jan 05, 2023 4:54 pm

Re: Get the Value of a dictionary in the Stimulsoft-Designer

Post by Xemaren »

Hello,

I am using the reports and I am already registering and synchronizing that Dictionary as a BusinessObject.
It is also shown to me as a Dictionary<string, object> in the report.
So the problem I have is, that I am trying to access the value of that Dictionary with a given Key but it is sadly shown as null/empty.

Can I somehow access that value of that Dictionary?
Lech Kulikowski
Posts: 6244
Joined: Tue Mar 20, 2018 5:34 am

Re: Get the Value of a dictionary in the Stimulsoft-Designer

Post by Lech Kulikowski »

Hello,

Please send us a sample project that reproduces the issue for analysis.

Thank you.
Post Reply