ReportExecutionService.SetExecutionCredentials(DataSourceCredentials[]) Method


设置与当前报表执行关联的凭据。Sets the credentials associated with the current report execution.

 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



一个 DataSourceCredentials 数组。An array of DataSourceCredentials.



一个包含新扩展插件的 ExecutionInfo 对象。An ExecutionInfo object containing the new execution.


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

SOAP 标头用法SOAP Header Usage (In) TrustedUserHeaderValue(In) TrustedUserHeaderValue

(In) ExecutionHeaderValue(In) ExecutionHeaderValue

(Out) ServerInfoHeaderValue(Out) ServerInfoHeaderValue
纯模式所需的权限Native Mode Required Permissions 在主报表和所有子报表上: ReadPropertiesExecuteAndViewOn the main report and all subreports: ReadProperties AND ExecuteAndView
SharePoint 模式所需的权限SharePoint Mode Required Permissions 在主报表和所有子报表上: ViewListItemsOn the main report and all subreports: ViewListItems

如果在设置凭据时存在快照并且 AllowQueryExecution 为,则将 false 清除快照,并且任何参数都将重置为其默认值。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