Pentaho的CDE显示交叉表格
原来以为Table Component只能显示二维表格,但是在《Learning Pentaho CTools(PACKT,2016).pdf》看到交叉表(第6单元)
.
MDX:
WITH MEMBER [Measures].[Trend] as IIF(ISEMPTY(([Time].CURRENTMEMBER.lag(1), [Measures].[Sales])) OR [Measures].[Sales]=0, 0, ([Measures].[Sales]- ([Time].CURRENTMEMBER.lag(1), [Measures].[Sales])) /[Measures]. [Sales])+0 MEMBER [Measures].[Sales ($)] as [Measures].[Sales]+0 MEMBER [Measures].[Qt] as [Measures].[Quantity]+0 SELECT NON EMPTY CrossJoin({[Markets].[Territory].Members}, {[Measures].[Qt], [Measures].[Sales ($)], [Measures]. [Trend]}) ON COLUMNS, NON EMPTY {[Product].[Product].Members} ON ROWS FROM [SteelWheelsSales] Where [Time].[2004]
Table Component
.
Post Execution
function f() { var cells = $( "#" + this.htmlObject + " thead th" ); var level = "1"; cells.each(function(i, v) { if( i > 0 ) { //skip the first cell of each row var cell = $( v ); var originalText = cell.text(); var originalTextParts = originalText.split( "/" ); // cell.text( originalTextParts[1] ); //write the second part (the mobile company in your case) if(originalTextParts.length>1) { level = originalTextParts.length-1; } } }); var idx; for (idx = 0; idx < level; idx++) { var newHeaderRow1 = "<tr><th></th>"; var text='' var text_length=1 cells.each(function(i, v) { if( i > 0 ) { //skip the first cell of each row var cell = $( v ); var originalText = cell.text(); var originalTextParts = originalText.split( "/" ); // cell.text( originalTextParts[1] ); //write the second part (the mobile company in your case) if(originalTextParts.length==1) { newHeaderRow1+="<th></th>" } else if(originalTextParts.length>1) { if(text!=originalTextParts[idx]) { if(text === '') { text=originalTextParts[idx] } else { newHeaderRow1+=("<th valign='middle' align='center' colspan='"+text_length+"'>"+text+"</th>") text_length=1 text=originalTextParts[idx] } } else { text_length++; if((cells.length-1) == i) { newHeaderRow1+=("<th valign='middle' align='center' colspan='"+text_length+"'>"+text+"</th>") text_length=1 text=originalTextParts[idx] } } } } }); newHeaderRow1+="</tr>" $( "#" + this.htmlObject + " thead" ).prepend( newHeaderRow1 ); } cells.each(function(i, v) { if( i > 0 ) { //skip the first cell of each row var cell = $( v ); var originalText = cell.text(); var originalTextParts = originalText.split( "/" ); cell.text( originalTextParts[1] ); //write the second part (the mobile company in your case) } }); var newHeaderRow = "<tr><th></th><th colspan='4'>Latenza Media</th><th colspan='4'>Through. Download Medio</th></tr>"; // $( "#" + this.htmlObject + " thead" ).prepend( newHeaderRow ); //add some style... $( "#" + this.htmlObject + " thead th" ).css( "border", "1px solid #DEDEDE" ).css( "background", "#F9F9F9" ); $( "#" + this.htmlObject + " thead th:eq(0)" ).css( "border", "0px solid #DEDEDE" ).css( "background", "#FFFFFF" ); //hide first cell }
.
相关推荐
### Pentaho CTools 学习指南 #### 一、Pentaho CTools 概述 在《Learning Pentaho CTools》这本书中,作者Miguel Gaspar深入探讨了如何利用Pentaho CTools构建出既精细又具有高度定制性的分析解决方案。Pentaho ...
Learning Pentaho CTools Color Images Learning Pentaho CTools Color Images pentaho数据可视化 CTools 套件学习 使用书籍
Being an introductory chapter Chapter 1, Getting Started with CTools andChapter 9: Pentaho App Builder, Chapter 10, Embed, Deploy, and Debugdoes not contain code files. Chapter 1, Getting Started ...
Pentaho and CTools are two of the fastest and most rapidly growing tools for practical solutions not found in any other tool available on the market. Using Pentaho allows you to build a complete ...
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, ...
作为介绍性章节,第1章,CTools入门和第9章:Pentaho App Builder,第10章,嵌入,部署和调试不包含代码文件。 第1章“ CTools入门”简要介绍了CTools的历史。 它还将向您介绍该工具的用途,并教您安装社区工具...
1:Learning Pentaho CTools(PACKT,2016).pdf 2:Pentaho Data Integration Beginner's Guide, Second Edition.pdf 3:Packt.Pentaho for Big Data Analytics.2013.pdf 4:pentaho kettle solutions.pdf 5:[Packt ...
用户可以学习到如何创建、编辑和运行步骤(Step),如数据库连接、表输入、表输出、过滤、转换等,以及如何进行错误处理和日志记录。 《eteenterprisejava.pdf》可能涉及与Java企业级应用相关的知识,虽然不是直接...
Pentaho是一款开源的企业级商业智能(BI)平台,它提供了数据集成、数据分析和报表等多种功能。这个压缩包中包含的是一系列经典的中文资料,涵盖了Pentaho的不同方面,旨在帮助用户深入理解和使用Pentaho。 1. **...
Pentaho Kettle是一款强大的ETL(提取、转换、加载)工具,由Pentaho公司开发。这个名为“pentaho-kettle-8.2.zip”的压缩包文件包含了Pentaho Data Integration(Kettle)的第8.2版本。Pentaho Kettle通过图形化的...
**Pentaho源码分析** Pentaho是一个开源的商业智能(BI)平台,它提供了数据集成、报表、分析和数据挖掘等功能。本文件将深入探讨Pentaho的内部架构和设计思想,帮助读者理解其核心组件和工作原理。 ### Pentaho...
import org.pentaho.reporting.engine.classic.core.modules.output.table.html.HtmlReportUtil; import org.pentaho.reporting.libraries.resourceloader.Resource; import org.pentaho.reporting.libraries....
【标题】:“Pentaho CDE 整合 Birt” 【描述】: Pentaho CDE(Component Development Environment)是Pentaho BI平台中的一个工具,用于构建交互式的Web仪表板。它允许开发者通过拖放的方式创建数据可视化应用,...
Pentaho 开放源码商业智能平台技术白皮书 Pentaho 是一个开放源码的商业智能平台,提供了一个完整的商业智能解决方案,包括数据integration、报表生成、数据分析和数据 mining 等功能。下面是 Pentaho 的技术白皮书...
### 在Linux上安装Pentaho BI Server的知识点详解 #### 一、配置JAVA环境 **1.1 查看已安装的JDK版本** 在Linux环境下安装Pentaho BI Server前,首先需要确保系统中安装了合适的Java运行环境。可以通过以下命令来...
完成上述步骤后,重启Pentaho BI Server,系统界面应显示为中文。然而,值得注意的是,汉化过程中可能会遇到一些隐藏的或特定场景下的英文文本,这需要深入代码或使用调试工具进行查找和修改。此外,保持对Pentaho...
赠送jar包:pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar; 赠送原API文档:pentaho-aggdesigner-algorithm-5.1.5-jhyde-javadoc.jar; 赠送源代码:pentaho-aggdesigner-algorithm-5.1.5-jhyde-sources.jar; ...