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

Pass data to table in the subreport

1 Answer 162 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jakub Wilk
Top achievements
Rank 2
Jakub Wilk asked on 22 Feb 2011, 07:07 PM
DataTable dt = "DataTable with some data";
TrackTime tt = TrackTime();  //Master report with subreport 'SubTrackTime'
if (dt != null)
{
       Telerik.Reporting.SubReport subReport = tt.Items.Find("subReport", true)[0] as Telerik.Reporting.SubReport;
       SubTrackTime stt = (SubTrackTime)subReport.ReportSource;
       Telerik.Reporting.Table tbl2 = stt.Items.Find("detailTable", true)[0] as Telerik.Reporting.Table;
        tbl2.DataSource = "DataTable with some data";
        Telerik.Reporting.Table tbl = tt.Items.Find("timeTable", true)[0] as Telerik.Reporting.Table;
         tbl.DataSource = dt;
         rvTimeTrack.Report = tt; //rvTimeTrack - reportViewer
}
This code is codebehind of *.aspx. The master report with table "timeTable" shows up, but the subreport doesn't. Why? What I do wrong?

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 25 Feb 2011, 12:15 PM
Hi Jakub Wilk,

We have not been able to reproduce this on our end and attached a sample project that works correctly. Review it carefully and let us know if further help is needed.

Kind regards,
Steve
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
General Discussions
Asked by
Jakub Wilk
Top achievements
Rank 2
Answers by
Steve
Telerik team
Share this question
or