or
<telerik:RadTabStrip ID="RadTabStrip1" SelectedIndex="0" runat="server"
MultiPageID="RadMultiPage1" Orientation="VerticalLeft" ontabclick="RadTabStrip1_TabClick">
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" Height="800" Width="800" >
<telerik:RadPageView ID="PageView1" runat="server">
</telerik:RadPageView>
</telerik:RadMultiPage>

Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
|
Stack Trace:
|
protected void radGridAll_ItemCommand(Object sender, GridCommandEventArgs e) { if (e.CommandName != "Print" ) return; Guid id = Guid.Parse(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"].ToString()); //lblMessage.Text = string.Empty; switch (e.CommandName) { case "Print": //string args = Request.QueryString["ApplicationID"]; NMotionServer.ApplicationLead _application = NMotionServer.ApplicationLeadService.GetByID(id); if (_application.LeadStatusID == (int)enumLeadStatus.Fresh || _application.LeadStatusID == (int)enumLeadStatus.Viewed) { AppHistory _leadStatusEvent = new AppHistory() { ApplicationLeadID = _application.ID, EventTypeID = 2, ForeignKeyID = (int)enumLeadStatus.Printed, Timestamp = DateTime.Now, UserProfileID = ((UserProfile)Session["_userProfile"]).ID }; AppHistoryService.Save(_leadStatusEvent); _application.LeadStatusID = (int)enumLeadStatus.Printed; ApplicationLeadService.Save(_application); } //RptApplication _applicationReport = new RptApplication((DealerLinkServer.SalesForceWebReference.SforceService)Session["SalesForceBinding"], args); RptApplication _applicationReport = new RptApplication(id.ToString()); ReportProcessor _processor = new ReportProcessor(); RenderingResult result = _processor.RenderReport("PDF", _applicationReport, null); string fileName = "NMotion_Lead_" + _application.ApplicantNameLast2First.Replace(" ", "_").Replace(",","_").Replace("'", "_") + "_" + _application.DateOfApplication.Year + _application.DateOfApplication.Month + _application.DateOfApplication.Day + ".pdf"; Response.Clear(); Response.ContentType = result.MimeType; Response.Cache.SetCacheability(HttpCacheability.Private); Response.Expires = -1; Response.Buffer = true; Response.AddHeader("Content-Disposition", string.Format("{0};FileName=\"{1}\"", "attachment", fileName)); Response.BinaryWrite(result.DocumentBytes); Response.End(); break; } }