Global API - FS

  • Last update:June 03, 2025
  • Version

    VersionFunctional Change

    11.0

    Difference from 10.0:

    No changes and all the following APIs are supported in V10.0.

    During report design, you can obtain the FS object (namely, the decision-making system) using global APIs for FS. The FS object encapsulates the attributes and APIs specific to the decision-making system. Since the report is embedded in an iframe, you need to first access window.parent to use the FS object, for example, window.parent.FS.signOut().

    iconNote:
    If the FineReport project is integrated into FineBI, you must register the FR Decision Platform function point to use the global APIs for FS. For details about the registration, see Local Machine Information Authentication.

    signOut


    API

    signOut()

    To log out of the decision-making system, that is, to return to the system login page.

    iconNote:
    Templates that use this API must be opened within the decision-making system. Direct preview is not supported.
    Parameter

    /

    /

    Returned Value

    void

    Example

    You can add the following code to a template and mount the template to the directory of the decision-making system. When you preview the template, the system will automatically log you out.

    window.parent.FS.signOut();
    Application Example

    You can mount the built-in template GettingStartedEN.cpt to the directory of the decision-making system. When you preview the template, you will be redirected to the system login page.

    Mobile Terminal

    This API is not supported on mobile terminals.

    iconNote:
    To log out of the decision-making system on mobile terminals, you can use the FR.logoutApp() API. For details, see [General] Logging out of the System by JS.

    tabPane.closeActiveTab


    API

    tabPane.closeActiveTab()

    To close the tab page of the decision-making system, that is, to automatically close the template being previewed in the system.

    Parameter

    /

    /

    Returned Value

    void

    Example

    You can add the following code to a template and mount the template to the directory of the decision-making system. When you preview the template, the template will be closed.

    window.parent.FS.tabPane.closeActiveTab();
    Application Example

    You can mount the built-in template GettingStartedEN.cpt to the directory of the decision-making system. When you preview the template, the corresponding tab page will be automatically closed after two seconds.

    Screen Recording 2025-06-03 at 14.26.16 (1).gif

    Mobile Terminal

    For general reports and FRM reports, this API is supported on mobile terminals. For FVS dashboards, this API is supported on mobile terminals only when the FineVis Data Visualization plugin is V2.6.0 or later.

    tabPane.addItem


    API

    tabPane.addItem(entry)

    To open a new tab page in the decision-making system.

    iconNote:
    This API is not supported for hyperlinks of reports in dialog boxes.
    Parameter

    entry

    {title: String,

     src: String}

    entry: an entry object corresponding to the tab item, which is required and in JSON format

    • title: title of the tab page, which is a string

    • src: the URL of the tab content, which is a string

    Returned Value

    void

    Example

    Example One: You can open a tab page on the platform with the title baidu and the URL https://www.baidu.com.

    window.parent.FS.tabPane.addItem({title:"baidu",src:"https://www.baidu.com"});

    Example Two: You can open a CPT file on the platform with the title Order Details and the file path demo/Basic/Sub_Drill Down Report_Order Details.cpt.

    window.parent.FS.tabPane.addItem
                ({title: "Order Details",
                  src: FR.servletURL+"?viewlet=demo/Basic/Sub_Drill Down Report_Order Details.cpt"
    })
    iconNote:
    When using the above code in FVS templates, replace FR.servletURL with duchamp.servletURL.
    Application Example

    For a report in the platform directory, you can click the hyperlink in the main report to open the sub-report in a new tab.

    For details, see Opening a Hyperlink on a New Tab Page.

    Screen Recording 2025-06-03 at 14.37.19 (1).gif

    Mobile Terminal

    For general reports and FRM reports, this API is supported on mobile terminals. For FVS dashboards, this API is supported on mobile terminals only when the FineVis Data Visualization plugin is V2.6.0 or later.

    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