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

DataSource binding for SubReport

1 Answer 501 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Emídio
Top achievements
Rank 1
Emídio asked on 01 Mar 2016, 08:54 AM

Hello,

Could someone provide me steps to bind a data set from Main Report Datasource to a SubReport Datasource?

I'm using 6.1.12.823 version of telerik reporting integrated with Visual Studio.

Best Regards,
Emídio Teixeira

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 03 Mar 2016, 01:42 PM
Hi Emídio,

A data item can be bound only to one of the DataTable objects of the DataSet object. Thus you will need a separate data source component per Datatable in the DataSet. The standard Master-Details scenario will let you display data via sub reports - How to: Create a Master-Detail Report Using a SubReport Item.

If data is loaded in a custom business object exposing relations between tables you can use the data-binding approaches from How to use the ReportItem.DataObject property in expressions
and How to Databind to Collection Properties. The main report will be bound to the main business object, and sub reports can be bound to collection properties or related data objects exposed as fields of the main report's data source.
For example, if you want to re-use the master report's data are elaborated in my post in How to bind the DataSource of a SubReport in the designer.



I hope this information is helpful.

Regards,
Stef
Telerik
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
Emídio
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or