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

Subreport values not binding to main report

1 Answer 68 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Arun
Top achievements
Rank 1
Arun asked on 05 Apr 2013, 04:28 AM
Hi,

I have one doubt,

I am using  telerik reporting version 6.1.12.820.
i have one subreport and one main report. subreport to binding the main report. i am using code below,

  Telerik.Reporting.SubReport subReport2 = (Telerik.Reporting.SubReport)poReport.Items.Find("subReport2", true)[0];
  subReport2.ReportSource.DataSource = pMaster;

it will show error, ('Telerik.Reporting.ReportSource' does not contain a definition for 'DataSource' and no extension method 'DataSource' accepting a first argument of type 'Telerik.Reporting.ReportSource' could be found (are you missing a using directive or an assembly reference?).


Advance Thanks

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 09 Apr 2013, 11:16 AM
Hello Arun,

The SubReport.ReportSource property can get value from any of the listed report source objects, and these report source objects contain a reference to a report definition (or the definition itself) and can pass parameters to it. The data is passed to the report document directly through the Report.DataSource property. In your case you need to use InstanceReportSource. You can find attached a sample Win Forms project illustrating the described (Form1.cs)

I hope this helps.

Regards,
Stef
the Telerik team

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

Tags
General Discussions
Asked by
Arun
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or