反饋已提交
網絡繁忙
FineReport 开放了大量的 JS API 给用户,用户利用这些 JS 接口,可实现更多更复杂的功能。
根据执行 JS 的主体不同可以将 FineReport 的 JS API 分为三大类:FR、FS、contentWindow。
FR:在 JS 语句中执行使用 FR 的方法或者属性。
例如:FR.Msg.alert,在设计器中可直接使用 FR 中的方法,在外部应用使用 FR 中的方法必须引入 finereport.js。
FS:是数据决策系统中的 JS 接口。
例如:FS.tabPane.addItem。
contentWindow:是在 Web 页面集成的时候,将 FineReport 报表嵌入在 iframe 中,调用报表对象时使用的接口。
例如:document.getElementById('reportFrame').contentWindow,其中document.getElementById('reportFrame')是获取 iframe 对象,contentWindow 是报表对象,相当于 HTML 中的 Window 对象。
1)在普通模板中
在普通模板的 JS 脚本中可以直接使用 contentWindow 下的属性,如直接使用 contentWindow中的 contentPane,而不用写 contentWindow,这是因为 JavaScript 脚本本身就在FR 模板中执行的。2)网页中使用 iframe 嵌入报表
如果文档包含框架( frame或 iframe 标签 ),框架中嵌入了 FR 报表,则会创建一个 contentWindow 对象先获取 iframe,再调用 contentWindow,然后使用 contentWindow 下面的属性,如下所示:
var contentWindow = document.getElementById("reportFrame").contentWindow.XXX;
不论是 Web 页面集成里面还是直接在 FR 模板之中,contentWindow 下面最常用的属性当属 contentPane,详细介绍参见下面的索引。
this
FineReport
contentPane
FS 决策系统
setInterval
文 檔回 饋
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉