Using Telerik Report Designer v 6.2.13.110
Description: In the Telerik Report designer, in-line sub reports are displayed at the bottom of the design page. User can select a sub report, right-click to bring up a menu, and select “Edit Report…”. When selected, the following error message appears:
Clicking “Continue” closes the dialog box; the sub-report is not opened. Contents of Details are:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.Reporting.Design.ReportDesigner.OnEditReport(Object sender, EventArgs e)
at System.ComponentModel.Design.MenuCommand.Invoke()
at Telerik.ReportDesigner.Packages.Design.VsMenuCommandService.MenuCommandToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
private
void
subReport1_ItemDataBound(
object
sender, EventArgs e)
{
(sender
as
Telerik.Reporting.Processing.SubReport).Visible = (
bool
)
this
.ReportParameters[
"ShowField"
].Value;
}
Imports System.Collections.Generic
Imports Telerik.Reporting
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim reportName As String = Server.UrlDecode(Me.Request.QueryString("ReportName"))
If Not String.IsNullOrEmpty(reportName) Then
Dim reportType As Type = Type.[GetType](reportName)
Dim report As IReportDocument = DirectCast(Activator.CreateInstance(reportType), IReportDocument)
Me.ReportViewer12.Report = report
Me.Page.Title = reportType.Name