共用方式為


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

使用指定頁面計數模式處理報表,並利用回呼函式所提供的資料流,依照指定的格式來轉譯它。

命名空間:  Microsoft.Reporting.WebForms
組件:  Microsoft.ReportViewer.WebForms (在 Microsoft.ReportViewer.WebForms.dll 中)

語法

'宣告
Public Sub Render ( _
    format As String, _
    deviceInfo As String, _
    pageCountMode As PageCountMode, _
    createStream As CreateStreamCallback, _
    <OutAttribute> ByRef warnings As Warning() _
)
public void Render(
    string format,
    string deviceInfo,
    PageCountMode pageCountMode,
    CreateStreamCallback createStream,
    out Warning[] warnings
)
public:
void Render(
    String^ format, 
    String^ deviceInfo, 
    PageCountMode pageCountMode, 
    CreateStreamCallback^ createStream, 
    [OutAttribute] array<Warning^>^% warnings
)
member Render : 
        format:string * 
        deviceInfo:string * 
        pageCountMode:PageCountMode * 
        createStream:CreateStreamCallback * 
        warnings:Warning[] byref -> unit 
public function Render(
    format : String, 
    deviceInfo : String, 
    pageCountMode : PageCountMode, 
    createStream : CreateStreamCallback, 
    warnings : Warning[]
)

參數

  • format
    類型:String
    用來轉譯報表的格式。這個參數對應到轉譯延伸模組。支援的格式包括 Excel、PDF、Word 和 Image。
    若要存取可用的轉譯延伸模組,請使用 ListRenderingExtensions 方法。
  • deviceInfo
    類型:String
    包含 format 參數指定的轉譯延伸模組所需要之裝置特定內容的 XML 字串。如需特定輸出格式之裝置資訊設定的詳細資訊,請參閱《SQL Server 線上叢書》中的<裝置資訊設定>。
  • pageCountMode
    類型:Microsoft.Reporting.WebForms.PageCountMode
    PageCountMode 列舉值,可指定頁面計數模式 。這個參數對硬分頁轉譯器沒有作用。如需軟分頁和硬分頁轉譯器的詳細資訊,請參閱 d57866f5-d876-41ce-bc49-0e72486a9617。理解轉譯行為

備註

This method accepts a CreateStreamCallback delegate function in the createStream parameter to support custom handling of secondary streams. This method is useful for printing.

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

請參閱

參考

LocalReport 類別

Render 多載

Microsoft.Reporting.WebForms 命名空間