Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Parameter, Filter, Charts

  1. #1
    Join Date
    Jun 2008

    Default Parameter, Filter, Charts


    I designed a sales report and now have the situation, that I would need the functionality, that the authentication is done partly by the sales man.

    I made a authentication over the admin site, but this is just, whether a user can use the report in generally or not.

    So, I would need the report so, that it is only performed for the transactions of the sales man, who is logged in, because he or she may not see the transactions of the colleagues.

    How I imagine, this would go with a filter, but I don't know where and how the filter should be build and propagated.

    Perhaps a parameter will be necessary to in order to give the report the information, which select will have to be performed.

    I am also interrested about information, how a chart could be added to a report, because this would also be one of the next things to do.

    Please give me information, how this could be solved with pentaho.



  2. #2
    Join Date
    Dec 2005



    in short, you can do this in the xaction.

    There you can retrieve the user from the session, put it in a variable/parameter and then pass the parameter into the query.

    Here is the relevant WIKI page. (


    P.s.: Example of an xaction that retrieves a user and uses it in a SQL query.
    <?xml version="1.0" encoding="UTF-8"?>
      <title>Country Security - Country List</title>
        <description>xaction to determin all countries for user.</description>  
        <user type="string"> 
        <country_list_result type="result-set"> 
          <action-type>Security Query</action-type>
            <user type="string"/> 
            <query-result type="result-set" mapping="country_list_result"/> 
            <query><![CDATA[SELECT DISTINCT g.country_name
    FROM 	dim_geography g,
    			sys_users_dimensions ud,
    			sys_users u,
    			sys_dimensions d
     WHERE d.dimension_name = 'Country'
      AND u.user_name = '{user}'
    	AND d.dimension_id = ud.dimension_id
    	AND u.user_id = ud.user_id
    	AND ud.dimension_key_value = g.country_id;]]></query> 

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.