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

SubReport DataSource

1 Answer 152 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
BNA
Top achievements
Rank 1
BNA asked on 27 Sep 2012, 09:30 PM
We were using a fairly simple method to assign DataTables as SubReport DataSources, so that a report with multiple sub-reports can be given data as a result of a single database call.

foreach (Telerik.Reporting.SubReport item in ReportLib.ReportBase.GetDescendantsByType(this.Report, typeof(Telerik.Reporting.SubReport)))
{
    item.ReportSource.DataSource = ds.Tables[ReportLib.ReportBase.GetDataSetIndex(item.Name)];
}

I updated to the 2012 Q2 release in order to get the PageCount bug fix, and now this approach no longer works.  I'm seeing references to new ReportSource sub-types, but I haven't found one which seems to allow for this sort of approach.  Can anyone help me out?

Note: We are using the same method for assigning DataSources for Crosstabs and Tables, and that appears to still work.

1 Answer, 1 is accepted

Sort by
0
BNA
Top achievements
Rank 1
answered on 28 Sep 2012, 01:01 PM
Ok, I believe I've found my answer here:

foreach (Telerik.Reporting.SubReport item in ReportLib.ReportBase.GetDescendantsByType(this.Report, typeof(Telerik.Reporting.SubReport)))
{
    item.Report.DataSource = ds.Tables[ReportLib.ReportBase.GetDataSetIndex(item.Name)];
}
Tags
General Discussions
Asked by
BNA
Top achievements
Rank 1
Answers by
BNA
Top achievements
Rank 1
Share this question
or