Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Using parameters in Report Designer with METADATA

  1. #1
    Join Date
    Jul 2010
    Posts
    29

    Smile Using parameters in Report Designer with METADATA

    Hi !
    I know how to use parameters in SQL query, but now, I would use them in MQL query with my METADATA Data source.

    I've already read some topic talking about that :

    http://forums.pentaho.org/showthread.php?t=73207
    http://forums.pentaho.org/showthread.php?t=73104

    And it's said that to use a parameter, I just have to create it (eg "lot") and use it in the mql query like :

    <condition>[TABLE.COLUMN] = [param:lot]</condition>

    But, when I run the report, I've an error saying that PRD cannot find my parameter...parameter which is created of course.

    "!SqlOpenFormula.ERROR_00XX_PARAM_NOT_FOUND!"

    How can I do to make it work ?

    Thanks

  2. #2

    Default

    Hi!
    I have the same behavior... both on 3.6.0 and 3.7.0
    Anyone have noticed the same thing?!

  3. #3
    Join Date
    Mar 2008
    Posts
    364

    Default

    The parameter needs to be defined in the mql query before you use it in the condition.

    i.e.

    Code:
    <mql>
    ...
    <parameters><parameter defaultValue="something" name="TEST" type="STRING"/></parameters>
    <selections><selection>...
    <condition>[Somebusinesscolumn] = [param:TEST]</condition>
    ...
    </mql>
    when you youse the MQL querybuilder and you add the column that you want to filter on to the condition area, you can create the parameter by just writing {TEST} into the value field and both <parameter> and <condition> are created for you

  4. #4
    Join Date
    Aug 2008
    Posts
    563

    Default

    I took the liberty to add your query builder advice to my Pentaho Report Designer Parameter tutorial.
    Thanks for sharing!
    Best regards,
    Diethard
    ===============
    Visit my Pentaho blog which offers some tutorials mainly on Kettle, Report Designer and Mondrian
    ===============

Tags for this Thread

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.