2012-03-23 21 views

回答

1

我在ASP.NET應用程序中執行此操作的另一種方式是實現IReportViewerMessages。

更改ProgressText物業

string IReportViewerMessages.ProgressText 
     { 
      get 
      { 
       return ("Please Wait... This will take some time"); 
      } 
     } 

其它性能都只是返回null。該inturn採取下面的鏈接中解釋的基本值。

string IReportViewerMessages.BackButtonToolTip 
     { 
      get { return null; } 
     } 

編輯web.config文件,並添加Appsetting標籤

<appSettings> 
    <add key="ReportViewerMessages" value="MyNamespace.MyRVMessageClass, MyAssembly" /> 
</appSettings> 

以下鏈接是如何做到這一點有益的,說明它是什麼。

http://msdn.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportviewermessages(v=vs.80).aspx

不過放眼望去如何做到這一點的BIDS SSRS。

+0

我想我不能解釋我的問題。我不想更改進度消息或隱藏返回按鈕。我想隱藏LOADING GIF。 – ebruszl 2015-12-14 13:08:54

0

其實這是一個圖像(gif),所以你需要創建一個圖像與自定義消息。對於實施,我認爲你應該看到這個問題:ReportViewer control loading indicator?

+0

正如我所提到的,我沒有使用任何ASP.Net應用程序,在表單加載事件中調用此方法。如何在SSRS中執行相同的操作。 – 2012-03-28 04:26:48

+0

如果SpinningWheel.gif是你所說的那個,它是一個指標,但不是它顯示的信息。 – 2012-03-30 07:11:22

+0

恐怕你是對的。我可以問你在網頁上查看報告的方式嗎?在什麼情況下,加載消息正在顯示?我的意思是,您是否在報告中使用了鑽取報告,多個參數或需要顯示此消息的其他情況。 – Hari 2012-03-30 10:00:16

1

我想我們不能在SSRS中更改加載消息。它只有get屬性。

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

上面的鏈接就是爲什麼我告訴我們不能改變的原因。

我們可以在ASP.NET應用程序中更改此消息,並使用JavaScript代碼完成此操作。

要改變spinningWheel加載指標的解決方案是我們必須去的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設計頁: 功能的get(ARG){

  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相應更改的

如果您同意此標記,則此答案爲有用的。