Share via


ReportingService2005.SetItemDataSources(String, DataSource[]) Method

Definition

Sets the data sources for an item in the catalog.

public:
 void SetItemDataSources(System::String ^ Item, cli::array <ReportService2005::DataSource ^> ^ DataSources);
public void SetItemDataSources (string Item, ReportService2005.DataSource[] DataSources);
member this.SetItemDataSources : string * ReportService2005.DataSource[] -> unit
Public Sub SetItemDataSources (Item As String, DataSources As DataSource())

Parameters

Item
String

The full name of the item for which to set the data sources. Accepts an EditSessionID generated by the CreateReportEditSession(String, String, Byte[], Warning[]) method.

DataSources
DataSource[]

An array of DataSource objects.

Remarks

The table below shows header and permissions information on this operation.

SOAP Headers (In) BatchHeaderValue

(Out) ServerInfoHeaderValue
Required Permissions Depends on the item type of Item:

- Report: UpdateDatasource
- Model: UpdateDatasource
- For each data source or model in the DataSources array:
- DataSource: ReadProperties
- Model: ReadProperties

SetItemDataSources returns an error when data source properties are set on a linked report item type.

An rsDataSourceNotFound error is returned if a data source that is not associated with the item is passed into the method.

When the Item type is a model, the specified value must be a single DataSourceReference. In this situation, if you supply an array of DataSource objects, an error is returned.

When the type of Item specified is a model, the DataSourceReference specified cannot reference a model or have 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.

Applies to