Report Export API

  • Last update:November 03, 2023
  • Version

    Version

    Functional Change

    11.0

    No difference between V10.0 and V11.0

    11.0.16

    Added the export API in the FineVis Data Visualization plugin of V2.0.0 and later versions.

    1. The exportReportToExcel interface is supported in table components.

    2. The exportTemplate interface is added, allowing you to export FVS templates as PDF, PPT, and image files.

    Public Module API

    exportReportToExcel

    Method

    exportReportToExcel(extype)

    Export a report in Excel format.

    Parameter

    extype: string

    Format (string) specified during export.

    page: in XLSX format during pagination export.

    simple: in XLSX format during unaltered export.

    sheet: in XLSX format during pagination and multi-sheet export.

    page_isExcel2003: in XLS format during pagination export.

    simple_isExcel2003: in XLS format during unaltered export.

    sheet_isExcel2003: in XLS format during pagination and multi-sheet export.

    iconNote:
    The sheet and sheet_isExcel2003 parameters are not supported in FVS table components.

    Return Value

    void

    Example

    Example 1: If the obtained report block object is defined as report, the report is exported in Excel format during pagination and multi-sheet export.

    report.gexportReportToExcel('sheet');

    Example 2: The general report is exported in Excel format during pagination and multi-sheet export.

    report.gexportReportToExcel('sheet');

    Example 3: The Table1_Page1 component in the FVS template is exported in Excel format during pagination export.

    duchamp.getWidgetByName("Table1_Page1).exportReportToExcel('page');

    Example 4: The report0 report block in the dashboard is exported in Excel format during pagination and multi-sheet export.

    _g().getWidgetByName('report0').exportReportToExcel('sheet');

    Application Example

    Customize an Excel Export button, which you can click to export a report in Excel format.

    Click to download the template: Excel Export.cpt

    Mobile Terminal

    The interface is supported only in Pagination Preview and Data Entry Preview of the general report.

    General Report API

    exportReportToImage

    Method

    exportReportToImage(extype)

    Export a report as an image file.

    Parameter

    extype: string

    Format (string) specified during export.

    png: in PNG format.

    jpg: in JPG format.

    gif: in GIF format.

    Return Value

    void

    Example

    Example 1: If the obtained report block object is defined as report, the report is exported as an image file in PNG format.

    report.exportReportToImage('png');

    Example 2: The general report is exported as an image file in PNG format.

    report.exportReportToImage('png');

    Application Example

    Customize an Image Export button, which you can click to export a report as an image file.

    Click to download the template: Image Export.cpt

    Mobile Terminal

    The interface is supported only in Pagination Preview and Data Entry Preview of the general report.

    exportReportToPDF

    Method

    exportReportToPDF()

    Export a report in PDF format.

    Parameter

    /

    /

    Return Value

    void

    Example

    Example 1: If the obtained report block object is defined as report, the report is exported in PDF format.

    report.exportReportToPDF();

    Example 2: The general report is exported in PDF format.

    _g().exportReportToPDF();

    Application Example

    Customize a PDF Export button, which you can click to export a report in PDF format.

    Click to download the template: PDF Export.cpt

    Mobile Terminal

    The interface is supported only in Pagination Preview and Data Entry Preview of the general report.

    exportReportToWord

    Method

    exportReportToWord()

    Export a report in Word format.

    Parameter

    /

    /

    Returned value

    void

    Example

    Example 1: If the obtained report block object is defined as report, the report is exported in Word format.

    report.exportReportToWord();

    Example 2: The general report is exported in Word format.

    _g().exportReportToWord();

    Application Example

    Customize a Word Export button, which you can click to export a report in Word format.

    Click to download the template: Word Export.cpt

    Mobile Terminal

    The interface is supported only in Pagination Preview and Data Entry Preview of the general report.

    FineVis Visualization Dashboard API

    exportTemplate

    Method

    exportTemplate({format,merge,delay})

    Export a FVS template.

    Parameter

    formula: string

    FVS templates can be exported as PDF, PPT, and image (default setting) files.

     

    merge:boolean

    Export multiple pages concatenated into a single file.

    true (default value): Export multiple pages concatenated into a single file.

    false: Export multiple pages separately into a single ZIP compressed file.

    delay:number

    Delay time (unit as second)

    Returned value

    void

    Example

    Example 1: Export a FVS template as the PDF file with multiple pages concatenated.

    duchamp.exportTemplate({format: "pdf",merge: true, delay: 30});

    Example 2: Export a FVS template as the image file with multiple pages concatenated.

    duchamp.exportTemplate();

    Example 3: Export a FVS template as the PPT file with multiple pages independent.

    duchamp.exportTemplate({format: "ppt",merge: false, delay: 5})

    Application Example

    Customize an event, allowing you to export a template with multiple pages as the PDF file.

    Click to download the template: exportTemplate Interface.fvs

    Mobile Terminal

    Not supported

     

    Attachment List


    Theme: Secondary Development
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy