|
Article relates to
|
Telerik Reporting Q1 2009+
|
|
Created by
|
Steve, Telerik
|
|
Last modified
|
March 16, 2009
|
|
Last modified by
|
Steve, Telerik
|
PROBLEM
ReportViewer.Report property is no longer of type
Telerik.Reporting.Report, but of
Telerik.Reporting.IReportDocument.
DESCRIPTION
With the new version of Telerik Reporting -
Q1 2009 (v.3.0.9.311) - we introduced a new functionality, called
Report Book,
that allows you to combine two or more reports in a single document.
While developing the new feature, our primary goal was to make the
reporting engine work no matter if it should render one or more
reports. This new requirement imposed the need to abstract the single
Report and the aggregation of two or more reports into the new
IReportDocument interface.
Starting with the 2009 Q1 version of Telerik Reporting both Windows Forms and ASP.NET Report Viewer controls operate with
IReportDocument objects instead of single
Report objects. Compared to the
Report object the new interface exposes a limited functionality that we consider common for both
Report and
Report Book. This means that it is not possible to use the ReportViewer.Report property as before and this applies to both viewers.
SOLUTION
In case you are sure that the viewer is currently showing a single
report and you need to access its properties, you can always
cast the object returned by the ReportViewer.Report property to
Telerik.Reporting.Report type:
C#
VB.NET
Another possible solution is to
instantiate your report before passing it to the viewer so there is no
need to access it through the viewer:
C#
VB.NET
Please
Sign In
to rate this article.