簡體   English   中英

使用日期參數時Reporting Services 2008 R2 JavaScript錯誤

[英]Reporting Services 2008 R2 javascript errors when using date parameters

我在IIS 7下運行的SQL Server Reporting Services R2報表上出現JavaScript錯誤。這些報表與IIS在同一服務器上運行。 報表查看器控件嵌入在MVC 1.0頁面上的iFrame中,到達經典的asp.net頁面(盡管當我自己運行報表頁面時也會出現相同的問題)。

我尚未在報告中添加額外的自定義javascript。 就是說,頁面上的報表查看器控件僅隨附了普通的javascript。


在Firefox 4下,當我運行帶有日期參數的報表時,報表將使用默認日期運行。 如果更改它們,則會出現以下錯誤:

frames.ReportViewerTouchSession0.location is null
document.getElementById("ReportViewer_ctl00").ParametersController is undefined

無論是自動回發還是通過“查看報告”按鈕手動觸發報告,報告都不會刷新。

IE8我得到這個:

'document.getElementById(...).ParametersController' is null or not an object

IE8的調試器在ViewState中的某個隨機位置中斷。

IE9的錯誤有所不同(當您單擊日期選擇器時):

Unable to get value of the property 'ToggleVisibility': object is null or undefined 
Unable to get value of the property 'HideActiveDropDown': object is null or undefined 

同樣,調試器無法在任何源代碼中給我有用的行號。

沒有任何404網絡錯誤可能表明未加載腳本。

TrueFalse之間更改AsyncRendering屬性不會有任何影響。

我發現您需要按照此處的詳細說明在web.config中移動Web處理程序。 修復了我遇到的其他一些問題,但是這個問題仍然存在。


我要把這根頭發撕掉!


為了完整起見,這是該頁面的asp.net代碼:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Report.aspx.cs" Inherits="Tenders.Web.Report" %>

<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server"></head>
<body>
    <form id="form1" action="/Report.aspx" runat="server">
    <asp:ScriptManager ID="ScriptManager" runat="server" EnablePartialRendering="true" ScriptMode="Release">
    </asp:ScriptManager>

    <asp:UpdatePanel ID="ReportViewerUP" runat="server">
        <ContentTemplate>
            <rsweb:ReportViewer ID="ReportViewer" runat="server" Width="100%" ProcessingMode="Local"
             InteractivityPostBackMode="AlwaysAsynchronous" AsyncRendering="true">
            </rsweb:ReportViewer>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>

看來我使用的是錯誤版本的報表查看器控件。 將項目和web.config參考從Microsoft.ReportViewer.WebForms程序集的v9更改為v10已解決了該問題。

請參閱此連接錯誤以獲取更多信息(包括用於重現該錯誤和修復程序的演示項目): https : //connect.microsoft.com/VisualStudio/feedback/details/694408/reporting-services-2008-r2-reportviewer-javascript-錯誤-當-使用最新參數

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM