This is a migrated thread and some comments may be shown as answers.

Binding Nested List Objects to a Crosstab

6 Answers 308 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 27 Feb 2014, 04:39 PM
I am using version Q2 2013.

I am attempting to bind a nested set of List objects to a CrossTab but have found that the data for a List only shows .Capacity and .Count but no other members of the class are visible in the DataExplorer,

I have seen similar examples in this forum but I cannot open the examples without build issues since they were done in an earlier version.
Below is an example of set of nested Lists.
Please provide example code on how to properly bind these objects to a CrossTab.
Thanks in advance.

    public class Parent
    {
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public DateTime DOB { get; set; }
        public List<Child> ChildList { get; set; }
    }

    public class Child
    {
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public DateTime DOB { get; set; }
        public List<Sibling> SiblingList { get; set; }
    }

    public class Sibling
    {
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public DateTime DOB { get; set; }
    }

6 Answers, 1 is accepted

Sort by
0
KS
Top achievements
Rank 1
answered on 27 Feb 2014, 06:00 PM
0
Scott
Top achievements
Rank 1
answered on 27 Feb 2014, 07:22 PM
Hi KS:

This example does not help.
Is there an example that uses something similar to what I posted, such as using a nested set of "List<>" objects?
0
Scott
Top achievements
Rank 1
answered on 28 Feb 2014, 07:47 PM
I am having difficulty using these nested objects in a table.
The drilldown into the nested collections do not appear in the Data Explorer.

Can anyone help with this?
0
KS
Top achievements
Rank 1
answered on 28 Feb 2014, 08:01 PM
0
Scott
Top achievements
Rank 1
answered on 28 Feb 2014, 09:10 PM
The link states:
"The Report.DataSource property is set to a collection of Contact objects and we want to display a list of Phone objects for each Contact object. For the purpose add a Table item and set its DataSource property to Fields.Phones via binding as illustrated on the image below."

Unfortunately the image in this link is missing. This would of been helpful to visualize what these bindings look like in the designer.

How does the Report.DataSource set to a collection of ContactObjects?
How does the Table item set its DataSource to the Property Fields.Phones?
0
KS
Top achievements
Rank 1
answered on 04 Mar 2014, 02:09 PM
That is strange, I see the image. There is a screenshot of a binding
Property path:DataSource ; Expression:Fields.Phones

-KS

Tags
General Discussions
Asked by
Scott
Top achievements
Rank 1
Answers by
KS
Top achievements
Rank 1
Scott
Top achievements
Rank 1
Share this question
or