Page 1 of 1

Can't display nested data in datasource object

Posted: Thu Jul 18, 2019 1:13 pm
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
        }
    }]
}	

Re: Can't display nested data in datasource object

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

Please clarify which version are you use?

Also, please check the last release build.

Thank you.

Re: Can't display nested data in datasource object

Posted: Mon Jul 22, 2019 1:09 pm
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");

Re: Can't display nested data in datasource object

Posted: Tue Jul 23, 2019 12:33 pm
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!

Re: Can't display nested data in datasource object

Posted: Wed Jul 24, 2019 7:51 am
by Lech Kulikowski
Hello,

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

Thank you.