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

how to set datasource for sub report in sub report

1 Answer 174 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Thi Han
Top achievements
Rank 1
Thi Han asked on 24 Dec 2011, 03:37 AM
Hi all,
Now I am creating sub report.But I don't know how to set data source for sub report.Because my sub report is in sub report.Please reply me immediately.

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 28 Dec 2011, 08:58 AM
Hello,

The SubReport item is a container for a report item, which has a DataSource property which you can use to bind data to. If you do this from the invoking application, here is a code to achieve this:

Dim report As New Reports.MyReport
Dim subRepItem1 As Telerik.Reporting.SubReport = TryCast(report.Items.Find("SubReport1", True)(0), Telerik.Reporting.SubReport)
subRepItem1.ReportSource.DataSource = subtable

Hope this helps.

Regards,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

Tags
General Discussions
Asked by
Thi Han
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or