US and Worldwide: +1 (866) 660-7555
Results 1 to 4 of 4

Thread: Paramter

  1. #1
    Join Date
    Feb 2012
    Posts
    2

    Default Paramter

    Hello!

    I want to build a report where I can use more than one value as input for one parameter.
    So the sql must be dynamic....

    For example I want to search two material numbers 001 andd 002 which I write into the parameter matnr.

    The query looks like:

    Select * from MARA where MARA.MATNR = ${matnr}

    So this is only for one parameter possible,
    but for the two values query must look like

    Select * from MARA where MARA.MATNR = ${matnr_value1} OR MARA.MATNR = ${matnr_value2}.


    Is there a Solution for this Problem possible?

    Thx for any help!

  2. #2
    Join Date
    Mar 2003
    Posts
    7,557

    Default

    Use a multi-select parameter (named "matnr") and use

    .. WHERE MARA.MATNR IN (${matnr})
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3
    Join Date
    Feb 2012
    Posts
    2

    Default

    If I set 000005452000002,000004642006502 for parameter matnr pentaho seems to search against the complete value...
    the value is not split at the comma so there is no result becaue there is a search with 000005452000002,000004642006502
    and not with 000005452000002 and then with 000004642006502...

  4. #4
    Join Date
    Mar 2003
    Posts
    7,557

    Default

    If you give us a single long string, we will search with that single long string. We have no knowledge about your parameter system, and we do not know whether we shall split on a space, a comma or a semicolon.

    Use a MULTI-VALUE LIST parameter type in your report and the report viewer will feed the various items as separate parameters. If you use a text-field parameter type, you will always get only ONE SINGLE parameter value.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

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
  •