Hitachi Vantara Pentaho Community Forums
Results 1 to 8 of 8

Thread: session variable in report engine 3.5

  1. #1
    Join Date
    Mar 2009
    Posts
    205

    Default session variable in report engine 3.5

    Is the new report engine has access to BI-Server variables created with an session startup xaction (defined in sessionStartupActions.xml) ?

    i.e. my session startup xaction sets up a variable companyName.

    Could I use in the reporting engine formulas =ENV("companyName") directly ?

    I'd like to avoid using an xAction to call my prpt report.

    Thanks

  2. #2
    Join Date
    Mar 2009
    Posts
    205

    Default

    Is the ENV() function limited to the 6 internal values:

    serverBaseURL
    pentahoBaseURL
    solutionRoot
    hostColonPort
    username
    roles

    , or can we get other info, like user-defined session variables ?

  3. #3
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    3.5-GA is indeed limited to these properties.

    In 3.6, we now ask the session for more properties and if the object stored there is a string, we allow to use it as part of the environment.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  4. #4
    Join Date
    Mar 2009
    Posts
    205

    Default

    Great !

    Then, my example in my previous post (with companyName) would work ?

  5. #5
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Yes.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  6. #6

    Default How to use this in SQL Query??

    Hello,

    Then how to use this OpenFormaula -> =ENV("username") in the SQL query to implement user level security.

    In short, how to use that in SQL Query??

    Regards,
    Vishwesh

  7. #7
    Join Date
    Feb 2009
    Posts
    21

    Default

    Vishwesh,

    You can use ${env::username} in you SQL query.

  8. #8
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    ... assuming you use PRD-3.6 and BI-Server 3.5.2. The "env::*" fields are not available in PRD-3.5.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

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.