0

using ASP.NET with C# I have a ReportViewer inside an UpdatePanel with a Timer. When the page loads everything works fine. When the timer ticks, which should reload the updatepanel I get a javascript error. When I have the ReportViewer outside of the UpdatePanel it loads and ticks just fine without the error. Am I missing something that needs done to make the Report work inside the update panel.

Code that works with the ReportViewer outside the update panel.

<rsweb:ReportViewer ID="ReportViewerOpenOrders" runat="server" 
                AsyncRendering="False" BorderColor="Black" BorderStyle="Solid" 
                BorderWidth="1px" Font-Names="Verdana" Font-Size="8pt" Height="150px" 
                InteractiveDeviceInfos="(Collection)" ProcessingMode="Remote" 
                ShowBackButton="False" ShowCredentialPrompts="False" 
                ShowDocumentMapButton="False" ShowExportControls="False" 
                ShowFindControls="False" ShowPageNavigationControls="False" 
                ShowParameterPrompts="False" ShowPrintButton="False" 
                ShowPromptAreaButton="False" ShowRefreshButton="False" ShowToolBar="False" 
                ShowWaitControlCancelLink="False" ShowZoomControl="False" 
                SizeToReportContent="True" Visible="False" WaitMessageFont-Names="Verdana" 
                WaitMessageFont-Size="14pt" Width="196px">
                <ServerReport ReportPath="/path/report" 
                    ReportServerUrl="http://server/reportserver" />
            </rsweb:ReportViewer>




        <br />
        <asp:UpdatePanel ID="UpdatePanel3" runat="server">
            <ContentTemplate>
                <asp:Timer ID="TimerRefreshDashboards" runat="server" Interval="15000">
                </asp:Timer>
            </ContentTemplate>
    </asp:UpdatePanel>
        <br />

Code that gives javascript error.

<asp:UpdatePanel ID="UpdatePanel3" runat="server">
            <ContentTemplate>
                <asp:Timer ID="TimerRefreshDashboards" runat="server" Interval="15000">
                </asp:Timer>
                <rsweb:ReportViewer ID="ReportViewerOpenOrders" runat="server" 
                    AsyncRendering="False" BorderColor="Black" BorderStyle="Solid" 
                    BorderWidth="1px" Font-Names="Verdana" Font-Size="8pt" Height="150px" 
                    InteractiveDeviceInfos="(Collection)" ProcessingMode="Remote" 
                    ShowBackButton="False" ShowCredentialPrompts="False" 
                    ShowDocumentMapButton="False" ShowExportControls="False" 
                    ShowFindControls="False" ShowPageNavigationControls="False" 
                    ShowParameterPrompts="False" ShowPrintButton="False" 
                    ShowPromptAreaButton="False" ShowRefreshButton="False" ShowToolBar="False" 
                    ShowWaitControlCancelLink="False" ShowZoomControl="False" 
                    SizeToReportContent="True" Visible="False" WaitMessageFont-Names="Verdana" 
                    WaitMessageFont-Size="14pt" Width="196px">
                    <ServerReport ReportPath="/path/report" 
                        ReportServerUrl="http://server/reportserver" />
                </rsweb:ReportViewer>
            </ContentTemplate>
    </asp:UpdatePanel>

The javascript error

JavaScript runtime error: The value of the property 'A5b7a957bb0e442fba0fd1b9d91cfd06bCreateFixedHeaders' is null or undefined, not a Function object

In Visual Studio I also get a script block [dynamic] window that pops up stating this is the next statement that will be executed.

function onresize()
{
A5b7a957bb0e442fba0fd1b9d91cfd06bCreateFixedHeaders()
}
4

1 回答 1

1

ReportViewer 不能很好地与 UpdatePanel 配合使用。如果您需要独立于页面的其余部分刷新它 - 一种解决方案是将其作为单独的页面放入 IFRAME。

通过这种方式,您可以在计时器上重新加载 IFRAME(即使是普通的 JavaScriptsetInterval也可以)。

于 2013-11-12T21:33:32.227 回答