帆軟報表(finereport)圖表鑽取詳細類別 當前頁對話框展示


添加參數欄,季度下拉框的控件命名為 jd

這里添加雷達圖做案例

編輯→特效→ 添加JavaScript

參數:wd    值:分類名      #取雷達圖所點擊的點

參數:jd      值:公式$jd    #取參數下拉所選參數

 

 JavaScript詳細:

var iframe = $("<iframe id='001' name='001' width='100%' height='100%' scrolling='yes' frameborder='0'>") // iframe參數的命名及寬高等
if (wd == '緯度1') {    //判斷點擊到的點,根據所選緯度彈出明細對話框
    iframe.attr("src", "report?viewlet=/test/明細1.cpt&op=view&jd=" + jd + "")
} else if (wd == '緯度2') {
    iframe.attr("src", "report?viewlet=/test/明細2.cpt&op=view&jd=" + jd + "")
} else if (wd == '緯度3') {
    iframe.attr("src", "report?viewlet=/test/明細3.cpt&op=view&jd=" + jd + "")
} else if (wd == '緯度4') {
    iframe.attr("src", "report?viewlet=/test/明細4.cpt&op=view&jd=" + jd + "")
} else if (wd == '緯度5') {
    iframe.attr("src", "report?viewlet=/test/明細5.cpt&op=view&jd=" + jd + "")
} else if (wd == '緯度6') {
    iframe.attr("src", "report?viewlet=/test/明細6.cpt&op=view&jd=" + jd + "")
} else if (wd == '緯度7') {
    iframe.attr("src", "report?viewlet=/test/明細7.cpt&op=view&jd=" + jd + "")
} else if (wd == '緯度8') {
    iframe.attr("src", "report?viewlet=/test/明細8.cpt&op=view&jd=" + jd + "")
} else if (wd == '緯度9') {
    iframe.attr("src", "report?viewlet=/test/明細9.cpt&op=view&jd=" + jd + "")
}
var o = {
    title: wd,    //對話框標題(這里取雷達圖緯度名作彈出框標題)
    width: 1265,  //寬   統一寬高
    height: 370  //
}
FR.showDialog(o.title, o.width, o.height, iframe, o) //彈出對話框

 或者:*可單獨定義每個彈出框的寬高

var url = "";

var title = ""

var o = ""



if(wd=="緯度1"){

    url = "report?viewlet=/test/緯度1詳細.cpt&op=view&jd=" + jd + "";

    title = wd;

    o = {      

    width : 1265,  //對話框寬度  

    height: 370  //對話框高度  

    }; 

}else if(wd=="緯度2"){

    url = "report?viewlet=/test/緯度2詳細.cpt&op=view&jd=" + jd + "";

    title = wd;

    o = {    

    width : 1265,  //對話框寬度  

    height: 370  //對話框高度  

    };   
}

var iframe = $("<iframe id='inp' name='inp' width='100%' height='100%' scrolling='yes' frameborder='0'>"); // 對話框內iframe參數的命名,默認寬高占比是100%,可向下滾動    

iframe.attr("src", url); // 給iframe添加src屬性  

//彈出對話框

FR.showDialog(title, o.width, o.height, iframe,o);

 發現在決策系統里打開彈出框報錯,首次訪問時跳轉到明細的鏈接不正確

 

修改JavaScript

添加url參數:

公式= "http://"+serverName+":"+serverPort+servletURL+"?viewlet="

 修改鏈接:

  iframe.attr("src", url"+/test/明細1.cpt&op=view&jd=" + jd + "")

預覽效果: 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM