HelpLink 元素
Detail 屬性的 HelpLink 元素是報表伺服器所產生的 URL 字串。URL 會以 Microsoft 說明及支援所管理的網頁為目標,並提供有關 Reporting Services 中發生的特定錯誤之其他說明與知識庫文章。URL 具有下列語法:
http://www.microsoft.com/products/ee/transform.aspx?EvtSrc=value**&EvtID**=value**&ProdName**=value**&ProdVer**=value
下表列出 HelpLink URL 的引數。
引數 |
値 |
---|---|
EvtSrc |
"Microsoft.ReportingServices.Diagnostics.ErrorStrings.resources.Strings" |
EvtID |
例如,報表伺服器錯誤碼,rsReservedItem。 |
ProdName |
"Microsoft SQL%20Server%20Reporting%20Services"。產品名稱值是編碼的 URL。 |
ProdVer |
Reporting Services 的版本號碼。"8.00" 的值表示 SQL Server 2000 Reporting Services。 |
下列範例說明為錯誤碼 rsReservedItem 傳回的 HelpLink URL。當使用者嘗試修改或刪除在 Reporting Services 中的保留項目時,就會發生這個錯誤。
https://www.microsoft.com/products/ee/transform.aspx?
EvtSrc=Microsoft.ReportingServices.Diagnostics.ErrorStrings.resources.Strings
&EvtID=rsReservedItem&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=8.00
您可以使用 SoapException 類別來存取程式碼中的 HelpLink 元素。
Try
rs.DeleteItem("/Report1")
Catch e As SoapException
Console.WriteLine(e.Detail("HelpLink").InnerXml)
End Try
try
{
rs.DeleteItem("/Report1");
}
catch (SoapException e)
{
Console.WriteLine(e.Detail["HelpLink"].InnerXml);
}