ReportingService2010.SetSubscriptionProperties 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定訂閱的屬性。
public:
void SetSubscriptionProperties(System::String ^ SubscriptionID, ReportService2010::ExtensionSettings ^ ExtensionSettings, System::String ^ Description, System::String ^ EventType, System::String ^ MatchData, cli::array <ReportService2010::ParameterValue ^> ^ Parameters);
[System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetSubscriptionProperties", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)]
[System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")]
public void SetSubscriptionProperties (string SubscriptionID, ReportService2010.ExtensionSettings ExtensionSettings, string Description, string EventType, string MatchData, ReportService2010.ParameterValue[] Parameters);
[<System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetSubscriptionProperties", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)>]
[<System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)>]
[<System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")>]
member this.SetSubscriptionProperties : string * ReportService2010.ExtensionSettings * string * string * string * ReportService2010.ParameterValue[] -> unit
Public Sub SetSubscriptionProperties (SubscriptionID As String, ExtensionSettings As ExtensionSettings, Description As String, EventType As String, MatchData As String, Parameters As ParameterValue())
參數
- SubscriptionID
- String
訂閱的識別碼。
- ExtensionSettings
- ExtensionSettings
ExtensionSettings 物件,其中包含傳遞延伸模組專用的設定清單。
- Description
- String
對使用者顯示的有意義描述。
- EventType
- String
觸發訂閱的事件類型。
- MatchData
- String
與指定之事件類型相關聯的資料。 這項資料是由事件處理延伸模組用來比對訂閱與已引發的事件。
- Parameters
- ParameterValue[]
ParameterValue 物件的陣列,其中包含報表的參數清單。
- 屬性
備註
下表顯示標頭以及有關這項作業的權限資訊。
| SOAP 標頭使用方式 | (In) TrustedUserHeaderValue (Out) ServerInfoHeaderValue |
| 原生模式所需的許可權 | UpdateAnySubscription 或 (UpdateSubscription ,且使用者是報表擁有者,且訂用帳戶是計時訂閱) |
| SharePoint 模式的必要許可權 | ManageAlerts 或 (CreateAlerts ,且使用者是訂用帳戶擁有者,且訂用帳戶是計時訂用帳戶) |
參數的值 EventType 必須對應至報表伺服器上設定的事件處理延伸模組。 如果事件種類不是由事件處理延伸模組處理,則會擲回 SOAP 例外狀況和錯誤碼 rsInvalidEvent 。 事件種類必須由建立通知的事件處理延伸模組來處理。 當收到參數的值時 EventType ,就會查詢事件處理延伸模組,以判斷事件是否會建立通知。 如果沒有,則會擲回 SOAP 例外狀況和錯誤碼 rsEventNonSubscribeable 。
參數的值 MatchData 取決於事件種類。 如果事件是 TimedSubscription 事件, ScheduleDefinition 則需要物件做為 MatchData 參數。 您必須先將 ScheduleDefinition 物件序列化為 XML,才能將它以字串值的形式傳遞,並根據排程建立訂用帳戶。 XML 結構可能類似于下列範例中的結構:
<ScheduleDefinition>
<WeeklyRecurrence>
<StartDateTime>2003-02-24T09:00:00-08:00</StartDateTime>
<WeeksInterval>1</WeeksInterval>
<DaysOfWeek>
<Monday>True</Monday>
</DaysOfWeek>
</WeeklyRecurrence>
</ScheduleDefinition>
StartDateTime當元素作為 XML 字串傳遞時,該專案的值應該對應至日期格式 ISO 8601。 此國際日期和時間標準是延伸格式 CCYY-MM-DDTHH-MM-DDThh: MM: ss +/-Z,其中 "CC" 代表紀元 "YY" 年 "MM" 月份和 "DD" 天。 字母 "T" 是日期和時間分隔符號,而 "hh"、"mm"、"ss" 分別代表小時、分鐘和秒。 此標記法後面可以緊接著 "Z",以指出國際標準時間 (UTC) 。 若要指出時區(以本地時間和國際標準時間之間的差異表示),"Z" 的前面會加上 "+" 或 "-" 符號,後面接著以 hh: mm 表示的 UTC 時差。
如果 a 的排程定義 TimedSubscription 是共用排程,您必須傳遞共用排程的排程識別碼作為 MatchData 參數。 排程識別碼會傳遞為 String ,例如 "4608ac1b-fc75-4149-9e15-5a8b5781b843"。 您可以藉由呼叫方法來取得排程識別碼 ListSchedules 。
如果事件是快照更新訂閱,請 MatchData null Nothing 在 Visual Basic) 中將參數設定為 (。
SharePoint 使用者資訊中的 SharePoint 非系統管理使用者的「工作電子郵件」屬性應該是電子郵件傳遞延伸模組設定