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

Binding a table to a List property of the current DataSource

1 Answer 853 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Julien
Top achievements
Rank 1
Julien asked on 22 Oct 2011, 11:48 AM
Hi,

I'm beginning with the reporting with telerik, and I'm trying to create a report which is in facts a confirmation letter for activities on which the user has registred.

My data are only in memory, so I cannot use any SQL datasource, ...

So for now I create a reportViewer, I set the "Report" item to my ConfirmationLetter(and set the DataSource of my ConfirmationLetter to the "Participant" object.

I've no problem displaying some fields like firstname/lastname/... but I cannot figure out how to bind the table with one of my properties?

My Participant object has a "Activities" List, and I want to set that my table has to use this Activities List as datasource.

But when I go in the "DataSource" property of my table, I can only set a datasource which has be defined(here I've only the ParticipantDataSource), not any subproperty.

So how can I do this?

Thank you

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 26 Oct 2011, 09:27 AM
Hello Julien,

In order to use nested data collections our suggestion is to nest data items (SubReports, Table, List, Crosstab, Chart) and set the data items' DataSource property with binding to the field representing the complex type (Activities). This way the nested collection is accessible as normal field. Generally the easiest approach is to use List/Table item because you don't have to create additional report for every data level. Please review the following forum thread that elaborates on your inquiry: Data Source Business Objects.

Kind regards,
Peter
the Telerik team

Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

Tags
General Discussions
Asked by
Julien
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or