Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Pentaho Report Designer Order by parameter

  1. #1
    Join Date
    Sep 2016

    Default Pentaho Report Designer Order by parameter


    I would like to construct a report designer which has a query inside. I would like to pose a parameter to define to order by of that query. Therefore, the user can select when he runs the query that I would like to order by this column and the report will change according to users needs.
    I searched in google but I found that this is supported by other engines (not pentaho), and it would be very useful to have.

    However for pentaho, there used to exist some “hack” to do that, up until version 3, but not anymore. After an exhaustive search I couldn’t find anything else.

    Does anyone have any idea?


  2. #2
    Join Date
    Aug 2016


    My understanding is that this is not possible as it poses as SQL injection risk.

    However after looking up something similar I believe there is a workaround which involves using a JDBC (custom) connection with a script. However I cannot find the post

  3. #3
    Join Date
    Oct 2013


    You can create one parameter "test" dropdown with name and value like , select "One" as name , 1 as value.
    Now use this parameter in query like select * from table order by ${test} .
    So when you select One from dropdown list, it will return 1 in query, So your query become select * from table order by 1.

    This trick will work ...
    -- NITIN --

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.