2009-11-08 52 views
1

我正在開發一個報告服務,並同時excecuting查詢獲得:Reportins服務超時過期

報表處理期間發生錯誤。 調用的目標引發了異常。 超時已過期。操作完成之前超時的時間或服務器沒有響應。

我知道在SQL服務器上運行一分鐘或兩分鐘的查詢。

我設置好的連接字符串在web.config這樣的:

「數據源= SERVA;初始 目錄= myPortal;集成 安全= TRUE;連接超時= 1000」

它沒有爲我工作。

回答

3

可以指定在連接字符串中的connection timeout,但只是說應該多長時間等待連接成功,

什麼你要找的是command timeout。這指定了SSRS等待特定查詢成功的時間。如果我沒有記錯,您可以在command timeout設置中的每個報告中更改它。或者也許它被稱爲execution timeout

+0

你能發出確切的設置? – 2012-01-10 15:18:10

1

我如何得到這個在使用BIDS 2008年的工作:

  1. 在「報表數據」窗格中,右鍵單擊該數據集並選擇「數據集屬性」。
  2. 在「數據集屬性」模態窗口中的「查詢」選項卡的底部,設置「超時值(以秒爲
0

看到這個Link

後你完成了設計Dataset.xsd的,在Dataset.Designer.cs找到下面的代碼:

protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { 
     get { 
      if ((this._commandCollection == null)) { 
       this.InitCommandCollection(); 
      } 
      return this._commandCollection; 
     } 
    } 

並將其更改爲:

protected global::System.Data.SqlClient.SqlCommand[] CommandCollection 
    { 
     get 
     { 
      if ((this._commandCollection == null)) 
      { 
       this.InitCommandCollection(); 
       _commandCollection[0].CommandTimeout = 0; 
      } 
      _commandCollection[0].CommandTimeout = 0; 
      return this._commandCollection; 
     } 
    } 

建立您的程序並享受。

相關問題