none
Fields collection and Hierarch. Object DataSource - how to RRS feed

  • Question

  • I have following classes :

    public class Customer
    {
        public string FirstName    {get { return null; } }
    }

    public class CustPair
    {
        public Customer Morning{get {return null;}}
        public Customer Evening{get {return null; }}
    }

    public class CustPairColl : List<CustPair>{}

    When I add CustPairColl as a datasource it correctly shows hierarchy of Morning and Evening Customers. Now, I am trying to create a report that has two columns - FirstName for the Morning Customer and FirstName for the Evening Customer. When I drop FirstName of the Morning or Evening Customer to the cell or Table Control I am getting expression:
    =Fields!FirstName.Value
    which is incorrect. I cannot find a way to specify that FirstName property comes out of Morning or Evening Customer :)

    Any help is greatly appreciated.

    • Edited by AIAplace Friday, August 22, 2008 9:33 PM Incorrect header
    Friday, August 22, 2008 9:31 PM

All replies