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

处理具有指定 PageCountMode 值的报表,并用指定的格式呈现该报表。

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

语法

声明
Public Overrides Function Render ( _
    format As String, _
    deviceInfo As String, _
    pageCountMode As PageCountMode, _
    <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()
用法
Dim instance As ServerReport
Dim format As String
Dim deviceInfo As String
Dim pageCountMode As PageCountMode
Dim mimeType As String
Dim encoding As String
Dim fileNameExtension As String
Dim streams As String()
Dim warnings As Warning()
Dim returnValue As Byte()

returnValue = instance.Render(format, _
    deviceInfo, pageCountMode, mimeType, _
    encoding, fileNameExtension, streams, _
    warnings)
public override byte[] Render(
    string format,
    string deviceInfo,
    PageCountMode pageCountMode,
    out string mimeType,
    out string encoding,
    out string fileNameExtension,
    out string[] streams,
    out Warning[] warnings
)
public:
virtual array<unsigned char>^ Render(
    String^ format, 
    String^ deviceInfo, 
    PageCountMode pageCountMode, 
    [OutAttribute] String^% mimeType, 
    [OutAttribute] String^% encoding, 
    [OutAttribute] String^% fileNameExtension, 
    [OutAttribute] array<String^>^% streams, 
    [OutAttribute] array<Warning^>^% warnings
) override
abstract Render : 
        format:string * 
        deviceInfo:string * 
        pageCountMode:PageCountMode * 
        mimeType:string byref * 
        encoding:string byref * 
        fileNameExtension:string byref * 
        streams:string[] byref * 
        warnings:Warning[] byref -> byte[] 
override Render : 
        format:string * 
        deviceInfo:string * 
        pageCountMode:PageCountMode * 
        mimeType:string byref * 
        encoding:string byref * 
        fileNameExtension:string byref * 
        streams:string[] byref * 
        warnings:Warning[] byref -> byte[] 
public override function Render(
    format : String, 
    deviceInfo : String, 
    pageCountMode : PageCountMode, 
    mimeType : String, 
    encoding : String, 
    fileNameExtension : String, 
    streams : String[], 
    warnings : Warning[]
) : byte[]

参数

  • format
    类型:System.String
    呈现报表所用的格式。此参数将映射到某个呈现扩展插件。可以使用报表服务器上任何可用的格式设置扩展插件。
    若要访问可用呈现扩展插件列表,请使用 ListRenderingExtensions 方法。
  • deviceInfo
    类型:System.String
    一个 XML 字符串,包含 format 参数中所指定的呈现扩展插件所需的设备特定内容。有关特定输出格式的设备信息设置的更多信息,请参见 SQL Server 联机丛书中的Device Information Settings
  • mimeType
    类型:System.String%
    [out] 呈现的报表的 MIME 类型。
  • encoding
    类型:System.String%
    [out] 呈现报表内容时所使用的编码。
  • fileNameExtension
    类型:System.String%
    [out] 输出文件所使用的文件扩展名。
  • streams
    类型:array<System.String[]%
    [out] 流标识符。您可以使用它们来呈现与报表关联的外部资源(例如图像)。

返回值

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

注释

可以使用此方法导出和打印报表。

此方法成功完成后,pageCountMode 的值会影响当您调用 GetTotalPages() 方法时 ServerReport 对象使用的页计数模式。有关更多信息,请参见 GetTotalPages

请参阅

参考

ServerReport 类

Render 重载

Microsoft.Reporting.WebForms 命名空间