Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Passing username to BIRT Viewer

  1. #1
    Join Date
    Nov 2011

    Default Passing username to BIRT Viewer


    I am working on a project where it is necessary personalize the content of the report based on the user logged. I am using BIRT for developing and BIRT viewer for showing the reports.

    I looked into some tutorials and seems possible to achieve what I need.

    First, I follow this one I managed to get the username, as a variable/parameter into birt, but bad news is that i am getting the login page when running birt viewer from pentaho plattform. I can pentaho in my browser as trusted site to avoid such behaviour, but i would prefer not.

    I thought about a workaround. Instead of getting the user from BIRT, let's pass the user as a parameter when launching birt viewer. I went into the plugin.xml file and I included a parameter called "pentahousername". In this parameter, I am trying to assign the authenticated user, so when developing birt I can declare a parameter with the same name and play with it.


    In the code below, I am trying to get the userid, using "principalName", as I am doing with Xactions, but the parameter in birt is showing {principalName}. My questions are:

    does my workaround make any sense? if yes, what is the enviroment variable to pass to my parameter? should be principalName as I am using?


  2. #2
    Join Date
    Oct 2012



    we have the same problem : we want to send the current Pentaho username parameter to BIRT report execution (filter data, display username info,...).

    Any help ?

    Thanks !

  3. #3
    Join Date
    Nov 2012


    Did anyone find a solution for this?


  4. #4


    I actually had a similar question a few months ago. There is another thread that has some good ideas about how to get the username:

    However, I'm still hoping to setup a single-sign on from Pentaho to BIRT. This would also require having the user's password in order for BIRT to know if the user is authorized. The current BIRT plugin (described at makes a HTTP call from pentaho to the BIRT WebViewerExample webapp. The BIRT webapp needs to have some way to validate if the HTTP request should be allowed or not. This probably means that it would need the requestor's username and password. However, I haven't seen an easy way to pass both the username and password from pentaho to BIRT.

    One other option is that you could try to set a session variable in pentaho and then read it back from inside BIRT. However, I haven't been able to get it to work yet. The instructions are available here:

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.