This is a migrated thread and some comments may be shown as answers.
How to grouping on ReportItem.DataObject.RawData.Field
1 Answer 56 Views
This is a migrated thread and some comments may be shown as answers.
Dario Concilio
Top achievements
Rank 2
Dario Concilio asked on 06 Jul 2016, 10:31 AM

Hi to all,

I have a ObjectDataSource that has a property that return List of object

I would use this ones to populate a table object, after that Group by a particular field of list.

But when I try to add group on this table and try to exec report, It show me an error "This field not found in context"

 

Ex. I tryed to group on ReportItem.DataObject.RawData.FamilyCode

Table is in binding with MyMainObject.Rows that returns List<MyDetailedObject>

MyDetailedObject.FamilyCode exists!

Why?

1 Answer, 1 is accepted

Sort by
0
Accepted
Nasko
Telerik team
answered on 07 Jul 2016, 07:10 AM
Hello Potito,

The expression ReportItem.DataObject.RawData.FamilyCode is not correct. Depending on the context and how the object is bound to the data item, you need to use the data field directly:

= Fields.FamilyCode

or via the ReportItem.DataObject property:

= ReportItem.DataObject.FamilyCode

For additional information on the latter approach, please refer to the How to use the ReportItem.DataObject property in expressions  article.

Regards,
Nasko
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
Asked by
Dario Concilio
Top achievements
Rank 2
Answers by
Nasko
Telerik team
Share this question
or