ASP.Net报表查看器继续加载

时间:2019-02-27 03:05:21

标签: asp.net vb.net reportviewer

我有用VB构建的asp.net网站。当我单击链接以查看带有报表查看器的页面时,报表查看器有时会不断加载。似乎要尝试访问Internet,因为有时会收到诸如等待 IP地址等待az416426.vo.msecnd.net 之类的通知。我的网站托管在服务器中并使用IIS6。报表查看器仅显示同一服务器中sql server数据库中的数据。 我正在使用Reportviewer 15.0。有人可以解释为什么会这样吗?

这是我的asp代码:

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>

<!DOCTYPE html>

<html>
<head id="Head1" runat="server">
     <title>eOperasional</title>

    <meta http-equiv="Page-Enter" content="blendTrans(Duration=0.2)" />
    <meta http-equiv="Page-Exit" content="blendTrans(Duration=0.2)" />
    <script type="text/javascript" src="../Script/Common.js"></script>
</head>
<body style="height: 100%;">
    <form id="form1" runat="server">
    <table cellspacing="0" cellpadding="1" width="100%" border="0">
        <tr>
            <td class="subtitle">Detail</td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
                <rsweb:ReportViewer Visible="False" ID="rptView" runat="server" Width="100%" Font-Names="Verdana" Font-Size="8pt" Height="480px" InteractiveDeviceInfos="(Collection)" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt">
                <LocalReport ReportPath="User\MyReport.rdlc"></LocalReport>    
                </rsweb:ReportViewer>
                <asp:label id="lblMsg" runat="server" EnableViewState="False" CssClass="msg" Visible="false" ></asp:label>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>

这是我的Vb代码,用于调用报表查看器:

'dtTable = query from database and store in datatable

If dtTable.Rows.Count > 0 Then
    dtSource = New ReportDataSource("Hasil", dtTable)
    rptView.LocalReport.DataSources.Clear()
    rptView.LocalReport.DataSources.Add(dtSource)
    rptView.LocalReport.Refresh()
    rptView.Visible = True
End If

0 个答案:

没有答案