Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Using Pentaho session variables into Dashboards

  1. #1

    Post Using Pentaho session variables into Dashboards

    We're developing a dashboard which is intended to be sensitive to user's profile.

    We have a system xaction which catch some session users values (such as region, area, current year and month, etc). More information about this in http://wiki.pentaho.com/display/Serv...ol+Data+Access

    We already use these values in many pivot xactions to filter results to the user and it works great.

    But we didn't know how to pass session variables to CDF Dashboards in order to filter results in data sources.

    We finally find out how to do it and we're pleased to share it in this forum.

    1. Define the parameter in the Data Source using CDE. For instance:
    [["region","${[session:strRegion]}","String"]]

    where "region" is the CDF parameter and strRegion is the Pentaho session Variable.

    2. Edit the query and put ${region} where you want to use it.

    And that's it.

    This is the CDE view
    Name:  cdf02.jpg
Views: 686
Size:  24.1 KB

    This is the CDA view
    Name:  cdf01.jpg
Views: 648
Size:  36.5 KB

    good luck,

    carles

  2. #2
    Join Date
    Jul 2011
    Posts
    2

    Default

    Hi carles,

    Thanks for the informative thread.

    In similar lines, is there a way to read the session variable while using the enterprise edition dashboard designer?

    Thanks.

  3. #3
    Join Date
    Mar 2013
    Posts
    4

    Unhappy Need Help---New User

    Hey need ur valuable help to get the user pentaho login details to show on my dashboard ...

    I am able to get user info using
    Dashboard.context.user...... but I also want to show user login date and time details....

    Quote Originally Posted by cmassalle View Post
    We're developing a dashboard which is intended to be sensitive to user's profile.

    We have a system xaction which catch some session users values (such as region, area, current year and month, etc). More information about this in http://wiki.pentaho.com/display/Serv...ol+Data+Access

    We already use these values in many pivot xactions to filter results to the user and it works great.

    But we didn't know how to pass session variables to CDF Dashboards in order to filter results in data sources.

    We finally find out how to do it and we're pleased to share it in this forum.

    1. Define the parameter in the Data Source using CDE. For instance:
    [["region","${[session:strRegion]}","String"]]

    where "region" is the CDF parameter and strRegion is the Pentaho session Variable.

    2. Edit the query and put ${region} where you want to use it.

    And that's it.

    This is the CDE view
    Name:  cdf02.jpg
Views: 686
Size:  24.1 KB

    This is the CDA view
    Name:  cdf01.jpg
Views: 648
Size:  36.5 KB

    good luck,

    carles

  4. #4

    Default

    Hello,

    I have tried same way in pentaho CE 6.0 but it's not working for me could you please assist me ?

    Thanks

    Nitesh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.