ReportExecutionService.SetExecutionCredentials 方法

Sets the credentials associated with the current report execution.

命名空间:  ReportExecution2005
程序集:  ReportExecution2005(在 ReportExecution2005.dll 中)

语法

声明
Public Function SetExecutionCredentials ( _
    Credentials As DataSourceCredentials() _
) As ExecutionInfo
用法
Dim instance As ReportExecutionService 
Dim Credentials As DataSourceCredentials()
Dim returnValue As ExecutionInfo 

returnValue = instance.SetExecutionCredentials(Credentials)
public ExecutionInfo SetExecutionCredentials(
    DataSourceCredentials[] Credentials
)
public:
ExecutionInfo^ SetExecutionCredentials(
    array<DataSourceCredentials^>^ Credentials
)
member SetExecutionCredentials : 
        Credentials:DataSourceCredentials[] -> ExecutionInfo
public function SetExecutionCredentials(
    Credentials : DataSourceCredentials[]
) : ExecutionInfo

参数

返回值

类型:ReportExecution2005.ExecutionInfo
An ExecutionInfo object containing the new execution.

注释

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: 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.

请参阅

参考

ReportExecutionService 类

ReportExecution2005 命名空间