DataSource binding for SubReport

2 posts, 0 answers
  1. Emídio
    Emídio avatar
    2 posts
    Member since:
    Jul 2015

    Posted 01 Mar 2016 Link to this post


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

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

    Best Regards,
    Emídio Teixeira

  2. Stef
    Stef avatar
    3610 posts

    Posted 03 Mar 2016 Link to this post

    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.

    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
Back to Top