语言

ReportingService2010.CreateReportEditSession 方法

定义

在报告服务器数据库中创建一个新的报告编辑会话。

public:
 System::String ^ CreateReportEditSession(System::String ^ Report, System::String ^ Parent, cli::array <System::Byte> ^ Definition, [Runtime::InteropServices::Out] cli::array <ReportService2010::Warning ^> ^ % Warnings);
[System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/CreateReportEditSession", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)]
[System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")]
public string CreateReportEditSession(string Report, string Parent, byte[] Definition, out ReportService2010.Warning[] Warnings);
[<System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/CreateReportEditSession", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)>]
[<System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)>]
[<System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")>]
member this.CreateReportEditSession : string * string * byte[] * Warning[] -> string
Public Function CreateReportEditSession (Report As String, Parent As String, Definition As Byte(), ByRef Warnings As Warning()) As String

参数

Report
String

编辑会话关联的报告名称。

Parent
String

通往物品的路径。 这可以是一个文件夹或 SharePoint 库。

Definition
Byte[]

一个字节数组,包含与编辑会话关联的报告定义语言(RDL)。

Warnings
Warning[]

[出]一组 Warning 对象,描述在报告编辑会话创建过程中发生的任何警告。

返回

string A,用于识别编辑会话。

属性

注解

下表显示了该操作的头部和权限信息。

SOAP头的使用 (在) TrustedUserHeaderValue

(出局) ServerInfoHeaderValue
本地模式所需权限 ExecuteReportDefinition 而且,根据具体情况:

SharePoint 模式 必要权限 需要将系统属性 EnableLoadReportDefinition 设置为 true AND,具体取决于具体情况:

  • 如果 Parent 是空的,或者 null:无需更多许可
  • 如果 Parent 存在,但 Report 不存在: <xref:Microsoft.SharePoint.SPBasePermissions.AddListItems> 在 Parent<xref:Microsoft.SharePoint.SPBasePermissions.ViewListItems> 和 上定义于 Definition
  • 如果同时 Parent 存在和 Report :与上述相同,且对以下所有权限 Report:

    • <xref:Microsoft.SharePoint.SPBasePermissions.OpenItems>
    • <xref:Microsoft.SharePoint.SPBasePermissions.ViewListItems>
    • <xref:Microsoft.SharePoint.SPBasePermissions.EditListItems>

如果指定的文件夹或文档库不存在,就会发生错误。

如果参数中 Report 指定的报告不存在于指定位置,则 的 Report 值将设置全局值!编辑会话的 RDL 中用 ReportName 进行编辑。

调用DeleteItem删除报告编辑会话的方法,并将参数EditSessionID传递给方法。DeleteItem

定义不能包含基于表达式的连接字符串。 当它出现时, rsInvalidParameterValue 会通过这种方法返回。

默认情况下,报告编辑会话设置为上次使用后7200秒(2小时),使用户能够在缓存中长时间保留大量数据。 在某些使用模式下,这可能导致数据库和报告服务器负载增加 RSTempDB 。 在这种情况下,你应该考虑使用 LoadReport。

适用于