`

Pentaho Ctools 参数传递

阅读更多

参数联动过程中,需要将参数设置为

Custom Parameter examFilterParam

属性:

Public True

 

参数设置,有两种:

1. Custom Parameter examFilterParam

 

    Javascript code:

 

function f(dashboard1) {
    
    function getQueryParameter(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 
        var r = window.location.search.substr(1).match(reg);  //获取url中"?"符后的字符串并正则匹配
        var context = ""; 
        if (r !== null) 
             context = r[2]; 
        reg = null; 
        r = null; 
        return context === null || context === "" || context == "undefined" ? "" : context; 
    }
    
    if (getQueryParameter("param1") !== "") {
        return getQueryParameter("param1");
    } else {
        return 'yuwen';
    }

} 

 

二、设置全局

 

1. javascript    External File

    Name global

 

define([ 'amd!cdf/lib/underscore', 'cdf/lib/moment'], 
function( _, moment) {
    var global = {};
 
/***************************************************************************
 *                      MISC functions && settings     n                    *
 ***************************************************************************/
    
    global.configurations = {
        functions: {

            setParams:function(myDash,paramsObj){
                
                _.each(paramsObj,function(array){
                    myDash.setParam(array[0],array[1]);
                });
            }
            
            
        },
    
    
/***************************************************************************
 *                          MISC objects                                   *
 ***************************************************************************/
        
        objs: {
            globalParamSets:[["subjectFilterParam",["shuxue"]], ["examFilterParam",["20200304143128"]]]
            
        },
        

        
    };
    return global;
});

 

 

 

2. Function preInit

    Javascript code:

dashboard.preInit = function() {
    
    var globalParamSets = global.configurations.objs.globalParamSets;
    
    global.configurations.functions.setParams(dashboard,globalParamSets);
}; 

 

 

...

分享到:
评论

相关推荐

    Learning Pentaho CTools Color Images

    Learning Pentaho CTools Color Images Learning Pentaho CTools Color Images pentaho数据可视化 CTools 套件学习 使用书籍

    Learning Pentaho CTools(2016)(随书代码)

    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 ...

    learning-pentaho-ctools

    learning-pentaho-ctoolslearning-pentaho-ctoolslearning-pentaho-ctoolslearning-pentaho-ctoolslearning-pentaho-ctoolslearning-pentaho-ctoolslearning-pentaho-ctools

    Learning Pentaho CTools(PACKT,2016)

    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 ...

    Learning Pentaho CTools.pdf

    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, ...

    pentaho data-integration Kettle 参数传递示例

    1,安装mariadb,导入selfuse.sql;源表input,目的表output,根据flg为提取标志,id为选取范围。思路为:提取未提取记录的id范围,根据id范围提取所有符合要求的记录;提取成功后更新原表flg为已提取。...

    Learning-Pentaho-CTools:Packt Publishing学习Pentaho CTools

    作为介绍性章节,第1章,CTools入门和第9章:Pentaho App Builder,第10章,嵌入,部署和调试不包含代码文件。 第1章“ CTools入门”简要介绍了CTools的历史。 它还将向您介绍该工具的用途,并教您安装社区工具...

    Pentaho prpt参数国际化

    该文件用于替换Pentaho: ...ParameterXmlContentHandler$OutputParameterCollector.class (报表参数国际化)ReportFileMetaDataProvider.class(报表Title左列菜单国际化) 用于 生成国际化的Pentaho report Parameter

    kettle资料6本

    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 ...

    Pentaho源代码阅读报告

    插件调用的参数传递 23 插件的参数配置机制 24 Pentaho的Audict机制 25 Pentaho核心与Style分离的机制 26 Pentaho相关的设计模式 26 EventListener模式 26 抽象工厂模式 28 工厂方法模式 29 Facade模式 30 Adapter...

    pentaho-aggdesigner-algorithm-5.1.5-jhyde-API文档-中文版.zip

    赠送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; ...

    [Pentaho] Pentaho 5.0 报表实例开发 初学者指南 (英文版)

    [Packt Publishing] Pentaho 5.0 报表实例开发 初学者指南 (英文版) [Packt Publishing] Pentaho 5.0 Reporting by Example Beginner's Guide (E-Book) ☆ 图书概要:☆ Create high-quality, professional, ...

    Pentaho Solutions

    Pentaho Solutions Pentaho Solutions

    pentaho kettle中文开发手册

    pentaho kettle中文开发手册

    pentaho-aggdesigner-algorithm-5.1.5-jhyde.tar

    解决 Cannot resolve org.pentaho:pentaho-aggdesigner-algorithm:5.1.5-jhyde jar放入D根目录执行: 以下命令加入本地maven库 mvn install:install-file -DgroupId=org.pentaho -DartifactId=pentaho-aggdesigner-...

    Pentaho Data Integration(Kettle9.0.0.2)&Pentaho Data Reporting

    Pentaho Data Integration(原Kettle)和 Data Reporting工具最新版9.0.0.2.530百度云下载地址 ETL工具及报表展示工具

    Pentaho_bi_server配置手册

    Pentaho笔记 3 2 使用MySQL作为Pentaho默认数据库 4 2.1 创建数据库 4 2.2 配置Pentaho 4 1配置Pentaho使用FoodMart数据 6 1.1注册数据源 6 1.2定义多维数据schema 7 1.3注册schema 7 1.4配置Pentaho使用filesystem-...

    pentaho-aggdesigner-algorithm-5.1.5-jhyde.zip

    org / pentaho / pentaho-aggdesigner-algorithm / 5.1.5-jhyde / pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar,解决maven引入hive的jar包时依赖报错Could not find artifact org.pentaho:pentaho-aggdesigner-...

    创建 Pentaho Solutions 中文

    创建 Pentaho Solutions 中文

    pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar.zip

    解决maven引入hive的jar包时依赖报错Could not find artifact org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde in xxx的问题,maven路径org/pentaho/pentaho-aggdesigner-algorithm/5.1.5-jhyde/pentaho...

Global site tag (gtag.js) - Google Analytics