Article information
Article relates to
Telerik Reporting Q2 2012 +
Last modified
July 25th 2012
In general the report source represents a pointer to the report (object reference, assembly qualified type name, an URI to a file or XML markup) and parameters. When provided, the values of the ReportSource parameters are applied to the Report parameters at run-time. Prior Q2 2012, these Report parameters were part of the NavigateToReportAction (drill-through action) and the SubReport item (master-detail scenario).
The following properties of the SubReport item are now obsolete and when used the compiler will generate the following warnings:
Here is a sample snippet that shows how to specify a report for the SubReport item and its corresponding report parameters: C# pre-Q2 2012:
InvoiceReport report1 =
new
InvoiceReport();
Telerik.Reporting.SubReport subReport1 =
Telerik.Reporting.SubReport();
subReport1.ReportSource = report1;
subReport1.Parameters.Add(
Telerik.Reporting.Parameter(
"SaledOrderID"
,
"=Fields.SalesOrderID"
));
Telerik.Reporting.InstanceReportSource instanceReportSource1 =
Telerik.Reporting.InstanceReportSource();
instanceReportSource1.ReportDocument = report1;
instanceReportSource1.Parameters.Add(
subReport1.ReportSource = instanceReportSource1;
Dim
report1
As
New
InvoiceReport()
subReport1
Telerik.Reporting.SubReport()
subReport1.ReportSource = report1
))
instanceReportSource1
Telerik.Reporting.InstanceReportSource()
instanceReportSource1.ReportDocument = report1
subReport1.ReportSource = instanceReportSource1
Telerik.Reporting.NavigateToReportAction reportAction1 =
Telerik.Reporting.NavigateToReportAction();
reportAction1.Parameters.Add(
"OrderNumber"
"SO43659"
reportAction1.ReportDocumentType =
"ReportLibrary1.InvoiceReport, ReportLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
;
textBox1.Action = reportAction1;
Telerik.Reporting.TypeReportSource reportSource =
Telerik.Reporting.TypeReportSource();
reportSource.TypeName =
reportSource.Parameters.Add(
reportAction1.ReportSource = reportSource;
reportAction1
Telerik.Reporting.NavigateToReportAction()
textBox1.Action = reportAction1
reportSource
TypeReportSource()
Report1 report1 =
Report1();
// perform additional operations on the report object if needed
ReportViewer1.Report = report1;
Telerik.Reporting.InstanceReportSource instanceReportSource =
instanceReportSource.ReportDocument = report1;
this
.ReportViewer1.ReportSource = instanceReportSource;
Report1()
'perform additional operations on the report object if needed
ReportViewer1.Report = report1
instanceReportSource
instanceReportSource.ReportDocument = report1
Me
.ReportViewer1.ReportSource = instanceReportSource
<
telerik:ReportViewer
ID
=
"ReportViewer1"
runat
"server"
Report
"ReportLibrary1.Report1, ReportLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
>
</
typereportsource
typename
The Report property of the WPF report viewer is now obsolete and when used the compiler will generate the following warning:
x:Name
"ReportLibrary1.Report1, ReportLibrary1"
/>
tr:ReportViewer
tr:ReportViewer.ReportSource
telerikReporting:TypeReportSource
TypeName
Telerik.Reporting.Processing.ReportProcessor reportProcessor =
Telerik.Reporting.Processing.ReportProcessor();
Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport(
"PDF"
, report1,
null
);
, instanceReportSource,
VB.NET pre-Q2 2012:
reportProcessor
Telerik.Reporting.Processing.ReportProcessor()
result
Telerik.Reporting.Processing.RenderingResult = reportProcessor.RenderReport(
Nothing
)
Resources Buy Try