reportviewer - 单击 "Loading..."按钮后更改 SSRS 报告中的进度条 "View Report"消息

标签 reportviewer reporting-services

我想在报告加载时更改“正在加载...”消息说“报告正在加载,请稍候这将需要几秒钟...”之类的。有什么办法可以改变这个吗?

注意:我没有使用任何 ASP.NET 应用程序。我需要在 SSRS 中完成此操作。

谢谢你的时间。

最佳答案

我认为我们无法更改 SSRS 中的加载消息。它只有 get 属性。

http://msdn.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportviewermessages.progresstext.aspx

上面的链接是我告诉我们不能改变的原因。

我们可以在我使用 javascript 代码完成的 ASP.NET 应用程序中更改此消息。

要更改 SpinningWheel 加载指示器,解决方案是我们必须像 @Harri 链接所说的那样使用 Windows 或 Web 应用程序。

为了更改消息,我使用了 ASP.NET 应用程序。现在选择后刷新参数时会改变。还有一些地方我必须改变。

浏览后来源:

<div id="ReportViewerDisplay_AsyncWait_Wait" style="cursor:wait;background-color:#DC9CE4;padding:15px;border:1px solid black;display:none;position:absolute;">
        <table height="100%">
            <tr>
                <td width="32px" height="32px">
                    <img src="/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=10.0.30319.1&amp;Name=Microsoft.Reporting.WebForms.Icons.SpinningWheel.gif" style="height:32px;width:32px;"/>
                </td>
                <td style="vertical-align:middle;text-align:center;">
                    <span style="font-family:Verdana;font-size:14pt;">Loading...</span>

                    <div style="margin-top:3px;">
                        <a href="javascript:$get(&#39;ReportViewerDisplay_AsyncWait&#39;).control._cancelCurrentPostback();" style="font-family:Verdana;font-size:8pt;color:#3366CC;">Cancel</a>
                    </div>
                </td>
            </tr>
        </table>
    </div>

ASP设计页面:

函数获取(参数){
         var divTag = document.getElementsByName('ReportViewerDisplay_AsyncWait_Wait');
            if (divTag != null ) {
                var tableTag = divTag.item(0);
                var rowTag = tableTag.childNodes[0];
                var columnTag = rowTag.childNodes[0];
                var tdtag = columnTag.childNodes[0];
                var spantag = tdtag.childNodes[0].nextSibling.childNodes[0];
                spantag.outerText = arg;
            }
     };
  </script>

隐藏代码:
protected void ReportViewerDisplay_PreRender(object sender, EventArgs e)
        {
            ClientScriptManager cs = Page.ClientScript;
            cs.RegisterStartupScript(typeof(Page), "PrintScript_" + UniqueID, "get('Please Wait');", true);
        }

注意:ReportViewerDisplay是ReportViewer控件的Id相应变化

如果您同意这一点,请将此答案标记为有用。

关于reportviewer - 单击 "Loading..."按钮后更改 SSRS 报告中的进度条 "View Report"消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9836705/

相关文章:

reporting-services - 修改 Reporting Services 报告 - RDL 没有改变?

asp.net - 如何在报告查看器中定义主体尺寸? ( Visual Studio 2010)

vb.net - ReportViewer 多个报告参数

reporting-services - SSRS [BC30277] - 字符类型 '&' 与声明的类型 'String' 不一致

reporting-services - SSRS 2008 图表 - 数据字段聚合?

reporting-services - 为什么 Reporting Services 报告比它的查询慢得多?

c# - 在 RDLC 报告中处理数组和聚合

c# - Microsoft.ReportViewer.WinForms.V15 与 .NET Core 3.1 不兼容 - 如何在 WPF Core 中显示 RDLC?

asp.net - ASP.NET 中的 Reportviewer 控件工具栏

asp.net - 禁用 ASP.Net ReportViewer 控件上的分页