Pentaho Tools :

Pentaho C-Tools(CDE,CDF,CDA),Pentaho CE & EE Server,OLAP-Cubes,Analysis using Pivot4J, Saiku Analytics, Saiku Reporting, Ad-hoc Reporting using Interactive Reporting Tool,Dashboards,Reports using PRD, PDD,Data Integration using Kettle ETL,Data Mining usign WEKA,Integration of Servers with Databases,Mobile/iPad compatible Dashboards using Bootstrap Css,Drilldown dashboards,Interactive Dashboards

Friday, 19 December 2014

Cascading multi select parameters example in pentaho CDE

Hello Guys

You will learn how to do cascading with multi select components in pentaho CDE . There is another post on the same topic in this site which was a basic one.

In this you will find the implementation of 
1) Custom parameters & default values
2) Multi select input controls cascading. 
3) Fixed height & back ground color for  input controls.
    
Final Look of the cascading parameter :

One of the Layouts design for selects (Country select place holder) [Not the Country label  place]

  
Custom Parameters :
param1 for country
Default value in Javascript code  ["US","Canada"]

param2 for state
Default value in Javascript code ["BC","WA"]

param3 for city


select1 for country
    select 1 parameter & listener is : param1


select2 for state
     select2 listeners
     
    select2 parameters (at only parameter place give param2)

select3 for city
    select3 listeners
    

    select3 parameters (at only parameter place give param3)

 Query 1 : country query (SELECT DISTINCT country FROM customer)


Query2 : state query
SELECT DISTINCT state_province FROM customer WHERE country IN (${param1})
NOTE : for multiple selection parameter name should be given with in bracket i.e., with in ()




Query 3 : city query
SELECT
    DISTINCT city FROM customer
WHERE
          (
               country IN (${param1}) 
             AND
             state_province IN(${param2})
          )

NOTE : for multiple selection parameter name should be given with in bracket i.e., with in ()




OUTPUT :  Image 1

Download the example : Click Me - Cascading multi select and HTML tabs examples


:-) Sadakar :-)

3 comments:

  1. Thanks for sharing, nice post! Post really provice useful information!

    An Thái Sơn với website anthaison.vn chuyên sản phẩm máy đưa võng hay máy đưa võng tự động tốt cho bé là địa chỉ bán máy đưa võng giá rẻ tại TP.HCM và giúp bạn tìm máy đưa võng loại nào tốt hiện nay.

    ReplyDelete
  2. Hi,
    Thank you for given some ideas. This is working much good as expected. But my doubt is "How to update the custom parameter".

    I have tried to update the parameter using "this.dashboard.fireChange". It is updating the parameter. but the db doesn't support the parameter format.

    For example,
    ib2 = ["a","b","c"];
    this.dashboard.fireChange('param2',ib2);

    I didn't get any output
    Pleae help me to resolve this

    ReplyDelete
    Replies
    1. Finally i have resolved my issue. i had pass the string inside the parameter. But it supports the array of string. I changed the string to array of string then it worked

      Delete