Can't display nested data in datasource object

Stimulsoft Reports.JS discussion
Post Reply
Cheryabushkin
Posts: 6
Joined: Thu Jul 18, 2019 6:43 am

Can't display nested data in datasource object

Post by Cheryabushkin »

I try to create report in Reports Designer and I ran into a problem. Reports JS does not allow to display data from various complex object at the root of my JSON-file.
When I create new report I want to see lines expanding for complex object in the step "Select Columns", but I see only root data.
Such a thing great working in Reports.NET but not in JS version.

Can I select data from varios complex object? How can I do this?

Thanks!

For example I give my JSON-file. I want display "name" from man.clotherType, "date" from "education" and "position" from "work" in the root.

Code: Select all

{
    "data" : [{
        "manid" : "cb700fdd",
        "man" :	{
            "number" : "0080",
            "description" : null,
            "clotherTypeId" : 29,
            "clotherType" : {
                "name" : "0005",
                "description" :	"",
                "id" :	29,
            },
            "growth" : 2301,
            "friendId" : "ed3e",
            "friend" : "48260",
            "friendContactInfo" : null,
            "personNumber" : "DN",
            "bDate" : "2012-09-20T00:00:00",
            "way" : 0,
            "id" : "cb700fdd",
        },
        "catName" : "sdfsdf",
        "personFileId" : null,
        "friendName" : "sdfsdf",
        "bFriendDate" : null,
        "friendsNumber" : null,
        "bDate" : "2019-07-17T06:38:35.735",
        "bFilename" : "Без названия от 17.07.2019",
        "education" : [{
            "group" : "RENT",
            "diplomName" : null,
            "number" : null,
            "date" :	"2019-07-17T06:38:35.735",
            "comment" : null,
            "diplomType" : null,
            "diplomId" : "1660b294-8c55",
            "id" : 2991,
        }],
        "id" :	"1660b294",
        "work" : {
            "position" : 0,
            "experience" : 0
        }
    }]
}	
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: Can't display nested data in datasource object

Post by Lech Kulikowski »

Hello,

Please clarify which version are you use?

Also, please check the last release build.

Thank you.
Attachments
Annotation 2019-07-22 102914.png
Annotation 2019-07-22 102914.png (229.96 KiB) Viewed 3043 times
Cheryabushkin
Posts: 6
Joined: Thu Jul 18, 2019 6:43 am

Re: Can't display nested data in datasource object

Post by Cheryabushkin »

Lech Kulikowski wrote: Mon Jul 22, 2019 7:29 am Hello,

Please clarify which version are you use?

Also, please check the last release build.

Thank you.

Hello, Lech!

Thanks for your answer!

I use "Version 2019.3.1 from 20 Май 2019, JS".
Сan you show me how you call the designer in your code please? Maybe my problem in my code :?

Thank you!

This is my code for call the designer.

Code: Select all

var options = new win.Stimulsoft.Designer.StiDesignerOptions();
options.height = '100%';
options.appearance.fullScreenMode = false;
                
var designer = new win.Stimulsoft.Designer.StiDesigner(options, 'StiDesigner', false);
var report = new win.Stimulsoft.Report.StiReport();

designer.onCreateReport = function (args) {
    var dataSet = new win.Stimulsoft.System.Data.DataSet("DataSources");
    dataSet.readJson(myJson);
    args.report.regData('DataSources', "", dataSet);
    args.report.dictionary.SynchronizeBusinessObjects;
    args.report.dictionary.synchronize(3);
}
designer.renderHtml("designer");
Cheryabushkin
Posts: 6
Joined: Thu Jul 18, 2019 6:43 am

Re: Can't display nested data in datasource object

Post by Cheryabushkin »

Hello!

As I understand it, I can not take data for my report from different tables at the same time?
I'm talking about what would be cool if the data in the window were presented in the form of a multi-level tree. This is what is extended. In the final report data cannot be displayed from other tables other than the one selected in step New Report -> Data Source.

I'm confused. Data output from different tables is a key point in my project, but I can't do it. I do not know whether it is possible in principle.
What can you say about this?

Thank you!
Attachments
stimulsoft.png
stimulsoft.png (74.88 KiB) Viewed 3022 times
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: Can't display nested data in datasource object

Post by Lech Kulikowski »

Hello,

You can retrieve data from nested table via relation:
MainDataTable.RaltionName.ColumnFromNestedTable

Thank you.
Post Reply