This is a migrated thread and some comments may be shown as answers.

Strange Error with SQL Report Viewer 2012

1 Answer 53 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
James Daresta
Top achievements
Rank 1
James Daresta asked on 25 Feb 2013, 08:37 PM

I have a page with SQL 2012 Report Viewer on it and using my global clientside error handling I get occassionally a popup telling me an error is occuring within the Telerik.Web.UI.WebResource.axd (attached). It is an Object Expected error. I have tried several things to eliminate, but have failed. Below is my html code for the page. I am only including parts of the master page. Note I had to use the UpdatePanel as the report viewer had issues with the Ajax Manager and it doing ajax calls.

Master Page

function Master_GlobalErrorHandler(message, errorURL, lineNumber) {
    var outputMessage = "An error occurred with the following details:\n\nMessage: " + message + "\nURL: " + errorURL + "\nLine Number: " + lineNumber + "\nUser Id: <%=lblLoggedInUser.Text %>\n\n\Please send this information to the help desk and the actions you were doing. Thank you.";
     
    $.ajax({
        type: "POST",
        url: "<%=(OlinCA.SalesCRM.Web.URLUtilities.GetAbsoluteURLBase() + OlinCA.SalesCRM.Web.URLUtilities.GetApplicationPath())%>Services/ErrorSendMail.asmx/SendMail",
        data: "{ 'FromAddress' : 'cawebmaster@olin.com', 'ToEmailAddresses' : ['jd1a@olin.com'] ,'Subject':'Sales CRM Client Side Error <%=System.Configuration.ConfigurationManager.AppSettings["CurrentRegion"].ToUpper() %>','Body':'" + outputMessage + "','ReplyTo':'cawebmaster@olin.com','IsBodyHtml':false}",
        contentType: "application/json; charset=utf-8",
        dataType: "json"}); 
    alert(outputMessage);
}
 
window.onerror = Master_GlobalErrorHandler;
$(document).ready(Master_InitializePage);

<form id="form1" runat="server">
 
<telerik:RadFormDecorator ID="rfdMasterPage" runat="server" RegisterWithScriptManager="true" />
<telerik:RadScriptManager ID="rsmMainScriptManager" runat="server">
    <Scripts>
        <%--Needed for JavaScript IntelliSense in VS2010--%>
        <%--For VS2008 replace RadScriptManager with ScriptManager--%>
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
    </Scripts>
</telerik:RadScriptManager>
<telerik:RadAjaxManager ID="ramMainAjaxManager" runat="server" DefaultLoadingPanelID="ralpMainLoadingPanel" ClientEvents-OnRequestStart="ramMainAjaxManager_OnRequestStart"></telerik:RadAjaxManager>   
<telerik:RadAjaxLoadingPanel ID="ralpMainLoadingPanel" runat="server"></telerik:RadAjaxLoadingPanel>   
<telerik:RadAjaxLoadingPanel ID="ralpMainLoadingPanelDropDown" runat="server" Transparency="0" IsSticky="false" Skin="">
    <asp:Image ID="imgMainLoadingPanelDropDown" runat="server" ImageUrl="~/images/loading3.gif" ImageAlign="Bottom" />
</telerik:RadAjaxLoadingPanel>

Page With Report Viewer

<%@ Page Title="" Language="C#" MasterPageFile="~/Controls/SalesContract.Master" AutoEventWireup="true" CodeBehind="SalesContractReports.aspx.cs" Inherits="OlinCA.SalesCRM.Web.SalesContract.Reports.SalesContractReports" %>
 
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<asp:Content ID="cMainContent" ContentPlaceHolderID="cphPageContent" runat="server">
 
<table class="TableFullWidth" cellspacing="0" cellpadding="3" >
    <tr>
        <td>
            <asp:Label ID="lblSalesContractReporting_Title" runat="server" Text="Sales Contract Reporting" CssClass="PageTitle" ViewStateMode="Disabled" ></asp:Label>
        </td>
        <td align="right">
            <asp:Label ID="lblSalesContractReporting_ReportListingLabel" runat="server" Text="Choose Report to View:" CssClass="LabelBold"></asp:Label>
            <asp:DropDownList ID="ddlSalesContractReporting_ReportListing" runat="server"
                DataValueField="Name"
                DataTextField="Name"
                OnSelectedIndexChanged="ddlSalesContractReporting_ReportListing_SelectedIndexChanged"
                AutoPostBack="true"
                ViewStateMode="Enabled"
                EnableViewState="true"
                width="200px"></asp:DropDownList>
        </td>
    </tr>
</table>
<table class="TableFullWidth" cellspacing="0" cellpadding="3" >
    <tr>
        <td>
            <asp:UpdatePanel ID="upSalesContractReporting_ReportViewer" runat="server">
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="ddlSalesContractReporting_ReportListing" EventName="SelectedIndexChanged" />
                </Triggers>
                <ContentTemplate>
                <rsweb:ReportViewer ID="rvSalesContractReporting_ReportViewer" runat="server"
                    Font-Names="Verdana"
                    Font-Size="8pt"
                    WaitMessageFont-Names="Verdana"
                    WaitMessageFont-Size="14pt"
                    Width="100%"
                    Height="100%"
                    CssClass="ContentTableBordered">
                 </rsweb:ReportViewer>
                </ContentTemplate>
            </asp:UpdatePanel>
        </td>
    </tr>
</table>
</asp:Content>


Page With Report Viewer

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 28 Feb 2013, 03:32 PM

Hi James,

Try to temporary replace you RadScriptManager with regular ScriptManager control. Also disablle Telerik Ajax by setting EnableAjax property of RadAjaxManager to false.

Let us know whether this helps you avoid the error.

Greetings,

Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Ajax
Asked by
James Daresta
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or