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

ObjectDataSource Is Not Recognizing Nest Complex Objects

1 Answer 70 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jaison
Top achievements
Rank 1
Jaison asked on 12 Jul 2016, 01:15 AM

I'm building an audit report using Telerik Reporting (version R2 2016 SP1). I'm using an ObjectDataSource object that accesses the app's business layer. I used the method call for the Data Member; but the Data Explorer doesn't recognize one of the complex object properties ("ChangeHistory") my coworker wrote.

  • What must I do to get the Telerik Designer in VS to fully recognize my business object?
  • Is there some limitation in Telerik's ability to reflect complex objects?
  • Does the object need to flatten?

System Info: Windows 7, .Net 4.5.1, Visual Studio 2013, Telerik Reporting (v R2 2016 SP1 using MVC implementation), MVC5

public class MfrClientInvoiceHeaderAuditHistoryDto
    {
        readonly string debitMemoNumber;
        readonly int clientCorpHierarchyId;
        readonly AuditDeaEntryDto remitDea;
        readonly AuditDeaEntryDto returnDea;
        readonly IEnumerable<AuditChangeRecordDto> changeRecords;
 
        public MfrClientInvoiceHeaderAuditHistoryDto(string debitMemoNumber, int clientCorpHierarchyId, AuditDeaEntryDto remitDto, AuditDeaEntryDto returnDto, IEnumerable<AuditChangeRecordDto> changeRecordDto)
        {
            this.debitMemoNumber = debitMemoNumber;
            this.clientCorpHierarchyId = clientCorpHierarchyId;
            this.remitDea = remitDto;
            this.returnDea = returnDto;
            this.changeRecords = changeRecordDto;
        }
 
        public string DebitMemoNumber { get { return debitMemoNumber; } }
        public int ClientCorpHierarchyId { get { return clientCorpHierarchyId; } }
        public AuditDeaEntryDto RemitDea { get { return remitDea; } }
        public AuditDeaEntryDto ReturnDea { get { return returnDea; } }
        public IEnumerable<AuditChangeRecordDto> ChangeHistory { get { return changeRecords; } }
        public string ProgramName { get; set; }
    }

 

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 12 Jul 2016, 09:24 AM
Hi Jaison,

The Data Explorer drills only in direct properties of the selected data object. Collection properties will expose fields like Count, Length and etc. coming from the type of the collection. If you need the fields of the type of the collection, add a temporary data source component to design the nested data item that will visualize the data.


For more details, please check Data Explorer does not show all or any data fields.


Regards,
Stef
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Jaison
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or