JS implementation dialog box to open the report

  • Last update:  2021-10-29
  • I. Overview

    1) Expected effect

    How to embed reports in iframe? The effect is shown below:

    gif.gif

    2) Implementation roadmap

    Add a click event to the button widget, add an Iframe pop-up and embed the template in it, and use remoteServletURL to get the template path.

    II. Example 

    1) Adding button widgets

    Create a general report, click Widget Settings in the right property panel, and add a button widget named click pop-up box. As shown below:

    1.jpg

    2) Add click events

    Select the button widget and click Widget Settings in the right property panel. Event, add click Event, click the button to preview the"GettingStartedEN. cpt" template in the popover. Add the cc parameter, whose value is expressed as remoteServletURL, to get the template path. As shown below:

    2.jpg

    The JavaScript is shown below:

    var iframe = $("<iframe id='inp' name='inp' width='100%' height='100%' scrolling='yes' framedorder='0'>");
    iframe.attr("src", cc+"?reportlet=GettingStartedEN.cpt");
    var o = {
    width : 700,  
    height: 500
    };
    FR.showDialog("添加", o.width, o.height, iframe,o);

    3) Effect preview

    Save the report and click Data Entry Preview. The effect is as shown in Section I.

    Note: Mobile terminal is not supported

    III. Download the template

    See: %FR_HOME%\webapps\webroot\WEB-INF\reportlets\\doc-EN\Parameter\JS_implementation_dialog_box_to_open_the_report.cpt

    Click to download the template: 

    JS_implementation_dialog_box_to_open_the_report.cpt


    Attachment List


    Theme: Parameter
    Already the First
    • 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