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

以指定页计数模式处理报表,并以指定格式呈现报表。

命名空间:  Microsoft.Reporting.WinForms
程序集:  Microsoft.ReportViewer.WinForms(在 Microsoft.ReportViewer.WinForms.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()
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
    类型:String
    呈现报表所用的格式。此参数将映射到某个呈现扩展插件。支持的格式包括 Excel、PDF、Word 和 Image。
    若要访问可用呈现扩展插件列表,请使用 ListRenderingExtensions 方法。
  • deviceInfo
    类型:String
    一个 XML 字符串,包含 format 参数中所指定的呈现扩展插件所需的设备特定内容。有关特定输出格式的设备信息设置的更多信息,请参见《SQL Server 联机丛书》中有关设备信息设置的部分。
  • mimeType
    类型:String%
    [out] 呈现的报表的 MIME 类型。
  • encoding
    类型:String%
    [out] 呈现报表内容时所使用的编码。
  • fileNameExtension
    类型:String%
    [out] 输出文件所使用的文件扩展名。
  • streams
    类型:array<String[]%
    [out] 流标识符。您可以使用它们来呈现与报表关联的外部资源(例如,图像)。

返回值

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

备注

This method can be used to export and print a report.

After this method completes successfully, the value of pageCountMode determines the default page count mode the LocalReport object uses when you call the GetTotalPages method. For more information, see GetTotalPages.

请参阅

参考

LocalReport 类

Render 重载

Microsoft.Reporting.WinForms 命名空间