ReportingService2006.SetItemDataSources(String, DataSource[]) ReportingService2006.SetItemDataSources(String, DataSource[]) ReportingService2006.SetItemDataSources(String, DataSource[]) Method


设置 SharePoint 库中某项的数据源。 Sets the data sources for an item in a SharePoint library.

 void SetItemDataSources(System::String ^ Item, cli::array <ReportService2006::DataSource ^> ^ DataSources);
public void SetItemDataSources (string Item, ReportService2006.DataSource[] DataSources);
Public Sub SetItemDataSources (Item As String, DataSources As DataSource())


String String String

项的完全限定 URL,其中包括文件名和扩展名。 The fully qualified URL of the item including the file name and extension.


一个数组DataSource对象。 An array of DataSource objects.


下表显示了有关此操作的标头和权限信息。The table below shows header and permissions information on this operation.

SOAP 标头SOAP Headers (In) TrustedUserHeaderValue(In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue(Out) ServerInfoHeaderValue
所需的权限Required Permissions EditListItemsItemANDViewListItems上每个数据源或模型中 DataSourcesEditListItems on Item AND ViewListItems on each data source or model in DataSources

Item类型是一种模型中,指定的值必须是单个DataSourceReference,不能引用模型或数据源凭据设置为PromptWhen the Item type is a model, the specified value must be a single DataSourceReference that cannot reference a model or have the data source credentials set to Prompt.

如果在项上存在多个数据源,可能会提交都将进行更改这些数据源。If multiple data sources exist on an item, only those data sources that are being changed may be submitted.

将.rsds 或.odc 文件与某一报表相关联时DataSourceReference必须包含带有文件名和.rsds 或.odc 文件扩展名的完全限定的 URL。When associating an .rsds or .odc file with a report, the DataSourceReference must contain the fully qualified URL with the file name and .rsds or .odc file name extension. 有关DataSourceReference文件扩展名.rsds 或.odc、 错误以外rsWrongItemType返回。For a DataSourceReference for a file name extension other than .rsds or .odc, the error rsWrongItemType is returned.