Cell Reference a Label to Open Dialog Box

  • Last update:March 24, 2021
  • I. Overview

    1.1 Expected Effect

    This article will introduce how to use the <a> tag in the cell to open the dialog window, the effect is shown in the following figure:

    1.gif


    1.2 Realization Ideas

    Set the body initialization event in frm to realize the hyperlink of the <a> tag in the cell to open the dialog window.

    II. Example

    2.1 Design Report

    1) Create a new dashboard, drag the report block report0 into the body, as shown in the figure below:

    2.png


    2.2 Report Block Design

    1) Edit the report block report0 and cell A1 to insert the formula: "Please click "+"<a href=" + "# " + " onclick=mm('/doc-EN/Advanced/BetweenCellOperation/Ranking.cpt&op=view')>here</a>"+" to open the ranking."

    Note: Add the path address of the report that needs to be opened in mm(''). Here, open the built-in line report as an example.

    3.png

    2) After the formula is added, set the display content of cell A1 to: Display By HTML, as shown in the following figure:

    4.png


    2.3 Quote JavaScript

    1) Click to download the JavaScript file: 

    dialog.js

    Place the file in the %FR_HOME%\webapps\webroot\scripts\js directory, as shown in the following figure:

    5.png

    The JavaScript code is as follows:

    function   mm(k){
    var height=document.body.clientHeight;
    var width=document.body.clientWidth;
    var iframe = $("<iframe id='inp' name='inp' width='100%' height='100%' scrolling='yes' frameborder='0'>");    
    iframe.attr("src","form?viewlet="+k); 
    //iframe.attr("src", "form?viewlet=Form7.frm"); 
    var o = {    
    width : width*1,  
    height: height*1  
    };    
    FR.showDialog("", o.width, o.height, iframe,o);
    }

    2) Select body, add an initialization event, and reference the above JavaScript script, as shown in the following figure:

    6.png


    2.4 Effect Preview

    Save the report, click PC preview, the effect is as shown in the figure below:

    7.gif

    Note: Mobile terminal is not supported.

    III. Template Download

    Refer to the completed template:%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\FeaturesApplication\Cell_reference_a_ label_to_open_dialog_box.frm

    Click to download:

    Cell_reference_a_ label_to_open_dialog_box.frm


    Attachment List


    Theme: Report Features
    • 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