Share via


ReportExecutionService.SetExecutionCredentials Method

Definition

Sets the credentials associated with the current report execution.

public:
 ReportExecution2005::ExecutionInfo ^ SetExecutionCredentials(cli::array <ReportExecution2005::DataSourceCredentials ^> ^ Credentials);
public ReportExecution2005.ExecutionInfo SetExecutionCredentials (ReportExecution2005.DataSourceCredentials[] Credentials);
member this.SetExecutionCredentials : ReportExecution2005.DataSourceCredentials[] -> ReportExecution2005.ExecutionInfo
Public Function SetExecutionCredentials (Credentials As DataSourceCredentials()) As ExecutionInfo

Parameters

Credentials
DataSourceCredentials[]

An array of DataSourceCredentials.

Returns

An ExecutionInfo object containing the new execution.

Remarks

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

SOAP Header Usage (In) TrustedUserHeaderValue

(In) ExecutionHeaderValue

(Out) ServerInfoHeaderValue
Native Mode Required Permissions On the main report and all subreports: ReadProperties AND ExecuteAndView
SharePoint Mode Required Permissions On the main report and all subreports: <xref:Microsoft.SharePoint.SPBasePermissions.ViewListItems>

If a snapshot exists when the credentials are set and AllowQueryExecution is false, the snapshot will be cleared, and any parameters will be reset to their default values.

If there are multiple data sources that prompt for the same report, you need to specify all of the credentials at the same time. If one set of credentials must be changed, you must supply all of the credentials again.

Credentials are only persisted for the lifetime of the execution, after which they must be specified again.

Applies to