注意 | ||
---|---|---|
| ||
本文档的示例代码仅适用于本文档中的示例报表/场景。若实际报表/场景与示例代码无法完全适配(如报表使用冻结,或多个宏代码冲突等),需根据实际需求开发代码。 |
示例说明
在透视分析报表中,如何实现分页信息(翻页按钮、上页下页按钮)放到表格的下方显示"?可以参考本文设置方法。
...
- 在资源定制中,创建一张透视分析;
- 选中透视分析,右键选择 编辑宏 进入报表宏界面。
- 在报表宏界面新建客户端模块,在弹出的新建模块对话框中选择对象为 INSIGHT;事件为 onRender;并把下面宏代码复制到代码区域。
宏类型
类型 | 对象 | 事件 |
---|---|---|
ClientSide | INSIGHT | onRender |
...
代码块 | ||||||
---|---|---|---|---|---|---|
| ||||||
function main(insight) { // debugger; //获取分页栏目 var navigationElem = insight.elem_trNavigation; var parentElem = navigationElem.parentNode; // 先将分页栏目从父节点中移除,再插入到"图形节点"之前 parentElem.removeChild(navigationElem); parentElem.insertBefore(navigationElem, insight.graphLay); //分页栏右对齐 //navigationElem.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild.align = "right"; if (navigationElem.firstChild && navigationElem.firstChild.firstChild && navigationElem.firstChild.firstChild.firstChild && navigationElem.firstChild.firstChild.firstChild.firstChild && navigationElem.firstChild.firstChild.firstChild.firstChild.firstChild && navigationElem.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild) { navigationElem.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild.align = "right"; } } |
...