Report.Render 方法 (String, String, String%, String%, String%, array<String[]%, array<Warning[]%)

处理报表并以指定的格式呈现该报表。

命名空间:  Microsoft.Reporting.WebForms
程序集:  Microsoft.ReportViewer.WebForms(在 Microsoft.ReportViewer.WebForms.dll 中)

语法

声明
Public Function Render ( _
    format As String, _
    deviceInfo As String, _
    <OutAttribute> ByRef mimeType As String, _
    <OutAttribute> ByRef encoding As String, _
    <OutAttribute> ByRef fileNameExtension As String, _
    <OutAttribute> ByRef streams As String(), _
    <OutAttribute> ByRef warnings As Warning() _
) As Byte()
public byte[] Render(
    string format,
    string deviceInfo,
    out string mimeType,
    out string encoding,
    out string fileNameExtension,
    out string[] streams,
    out Warning[] warnings
)
public:
array<unsigned char>^ Render(
    String^ format, 
    String^ deviceInfo, 
    [OutAttribute] String^% mimeType, 
    [OutAttribute] String^% encoding, 
    [OutAttribute] String^% fileNameExtension, 
    [OutAttribute] array<String^>^% streams, 
    [OutAttribute] array<Warning^>^% warnings
)
member Render : 
        format:string * 
        deviceInfo:string * 
        mimeType:string byref * 
        encoding:string byref * 
        fileNameExtension:string byref * 
        streams:string[] byref * 
        warnings:Warning[] byref -> byte[] 
public function Render(
    format : String, 
    deviceInfo : String, 
    mimeType : String, 
    encoding : String, 
    fileNameExtension : String, 
    streams : String[], 
    warnings : Warning[]
) : byte[]

参数

  • format
    类型:String
    呈现报表所用的格式。此参数将映射到某个呈现扩展插件。
    在本地处理模式中,支持的扩展插件为 Excel、PDF、Word 和 Image。在远程处理模式中,支持的扩展插件取决于报表服务器支持的扩展插件。
    根据处理模式(请参见 ProcessingMode),可以使用 ServerReportLocalReport 中的 ListRenderingExtensions 方法来访问可用呈现扩展插件列表。
  • deviceInfo
    类型:String
    一个 XML 字符串,包含 format 参数中所指定的呈现扩展插件所需的设备特定内容。有关特定输出格式的设备信息设置的更多信息,请参见《SQL Server 联机丛书》中有关设备信息设置的部分。
  • mimeType
    类型:String%
    [out] 呈现的报表的 MIME 类型。
  • encoding
    类型:String%
    [out] 呈现报表内容时所使用的编码。
  • fileNameExtension
    类型:String%
    [out] 输出文件所使用的文件扩展名。
  • streams
    类型:array<String[]%
    [out] 流标识符,您可以使用它们来呈现与报表相关联的外部资源(例如,图像)。

返回值

类型:array<Byte[]
具有指定格式的报表的 Byte 数组。

备注

有关特定的备注和代码示例,请参见 LocalReportServerReport 实现。

请参阅

参考

Report 类

Render 重载

Microsoft.Reporting.WebForms 命名空间