New to Telerik Reporting? Download free 30-day trial
In Design view, right-click a SubReport item to which you want to set a report source and click Properties.
In the item's Properties, click ReportSource.
A "Load a Report from" dialog appears which allows you to select a ReportSource.
Select the type of report source you would use to specify a report. For this example we would use Instance Report Source, click that option and select the report that would serve as detail report.
If you have to specify parameters for the report, follow the next step.
Click Edit Parameters button - Edit Parameters dialog appears. Click New. In the Parameter Name column select the name of a report parameter in the detail report. In the Parameter Value, type or select the value to pass to the parameter in the detail report.
var instanceReportSource = new Telerik.Reporting.InstanceReportSource(); // Assigning the Report object to the InstanceReportSource instanceReportSource.ReportDocument = new Telerik.Reporting.Examples.CSharp.Invoice(); // Adding the initial parameter values instanceReportSource.Parameters.Add(new Telerik.Reporting.Parameter("OrderNumber", "SO43659"));
Dim instanceReportSource As New Telerik.Reporting.InstanceReportSource() ' Assigning the Report object to the InstanceReportSource instanceReportSource.ReportDocument = New Invoice() ' Adding the initial parameter values instanceReportSource.Parameters.Add(New Telerik.Reporting.Parameter("OrderNumber", "SO43659"))
The Standalone Report Designer includes only XmlReportSource and UriReportSource options due to the format of the produced reports. In Visual Studio Report Designer you can use all available Report Sources.
If the report will be displayed in an HTML5 Viewer or Silverlight ReportViewer, the main report is rendered in HTML (XAML respectively) and it is loaded at the client. The sub report is considered as a content of the main report and its Report Source is resolved internally, withouit additional calls to the Reporting REST service (Reporting WCF Service respectively).