Direct URL Export (POST Request Method)

  • Last update:December 31, 2025
  • Overview

    Description

    The document Direct Report Export by URL instructs you on exporting a report via the GET request method. This document introduces how to export a report using the POST request method.

    Implementation Method

    You can export a report with the POST request through the doHyperlinkByPost API provided by FineReport.

    API Description

    MethoddoHyperlinkByPost(url,para,target,feature)Opens a webpage using the POST request method, allowing you to pass parameters and set page attributes.
    Parameter

    URL: object

    para: object

    target: object

    feature: object

    URL: URL or JSON hyperlink (required)

    An example of supported absolute URLs:

    http://192.168.100.1:8080/webroot/decision/view/report?viewlet=GettingStartedEN.cpt

    An example of supported relative URLs:

    /webroot/decision/view/report?viewlet=GettingStartedEN.cpt

    para: The parameter to be passed (optional)

    target: The location to open the hyperlink (optional)

    _dialog: Dialog box

    ­_self: Current page

    Name of a certain iframe, which will be opened on the current page, and submitted using the POST request method

    feature: Attribute of the hyperlink opening location (optional)

    iconNote: 
    The target and feature parameters are not supported on mobile terminals.
    Return Value

    void

    Mobile Terminal

    The API is supported on mobile terminals.

    iconNote: 
    The method for exporting FRM reports with POST requests is the same as the one introduced in this document.

    Example

    Template Preparation

    Create a general report, add a button widget on the parameter panel, and name the button Export.

    Click Event Adding

    Select the button widget and add a click event, as shown in the following figure.

    The JavaScript code is as follows:

    var url="${servletURL}?viewlet=GettingStartedEN.cpt"
    var config = {
                  Region : "New York",
                  format:"excel"
                   }
    FR.doHyperlinkByPost(url,config,_blank,"_self")

    The value of the format parameter represents the export method. For details, see Direct Report Export by URL.

    Effect Preview

    Save the report and click Pagination Preview. The following figure shows the preview effect.

    iconNote: 
    The effect cannot be previewed on mobile terminals.

    Template Download

    You can click to download the template: Direct Report Export by URL (POST Request Method).cpt

    Attachment List


    Theme: Report Application
    Already the First
    Already the Last
    • 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