Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: MDX query as parameter ${myMdx} in CDE DataSource

  1. #1

    Question MDX query as parameter ${myMdx} in CDE DataSource

    Dear Experst/Members,

    Short:
    I'd like to use "MultiSelect" component which on "Post Change" fills up a "Simple parameter" with a tested (MDX Query Editor) MDX Query and a component using Listener gives this fully-specified MDX Query as a singe parameter to DataSource.

    May I do it ?

    Detailed:
    I'd like to use "MultiSelect" component which on "Post Change" fills up a "Simple parameter" with a tested (MDX Query Editor) MDX Query.
    Next component is tableComponent which listens an accept this parameter and its DataSource is an "mdx mindrian ocer Jndi" type and get the parameter as "String" from parent tableComponent.

    I set default values like this:
    SELECT NON EMPTY {Hierarchize({[tipus.default].[tipus].[MSFAPN]})} ON COLUMNS,NON EMPTY {Hierarchize({[deptNa.default].[hosp].Members})} ON ROWS FROM [BSz]

    Yesterday evening I could see an example which convert parameter to something. Today I spent more than 5 hours to find again, but it was unsuccessfull.
    I tried to get information from here: http://msdn.microsoft.com/en-us/library/ms145970.aspx
    What I tried:

    StrToMember(),StrToSet()
    In two terminals I follow the tail of "catalina.out" and "pentaho.log" and they say:
    2012-06-27 15:29:35,572 ERROR [pt.webdetails.cda.CdaContentGenerator] Failed to execute: [ pt.webdetails.cda.dataaccess.QueryException ] - Found an unhandled exception: .( Cause [ pt.webdetails.cda.dataaccess.QueryException ] ReportDataFactoryException : Failed to create datasource:Mondrian Error:Failed to parse query 'StrToMember(SELECT NON EMPTY {Hierarchize({[tipus.default].[tipus].[MSFAPN]})} ON COLUMNS,NON EMPTY {Hierarchize({[deptNa.default].[hosp].Members})} ON ROWS FROM [BSz])'; Parent exception: Mondrian Error:Failed to parse query 'StrToMember(SELECT NON EMPTY {Hierarchize({[tipus.default].[tipus].[MSFAPN]})} ON COLUMNS,NON EMPTY {Hierarchize({[deptNa.default].[hosp].Members})} ON ROWS FROM [BSz])'
    Mondrian Error:Internal error: While parsing StrToMember(SELECT NON EMPTY {Hierarchize({[tipus.default].[tipus].[MSFAPN]})} ON COLUMNS,NON EMPTY {Hierarchize({[deptNa.default].[hosp].Members})} ON ROWS FROM [BSz])
    .( Parent [ org.pentaho.reporting.engine.classic.core.ReportDataFactoryException ] Failed to create datasource:Mondrian Error:Failed to parse query 'StrToMember(SELECT NON EMPTY {Hierarchize({[tipus.default].[tipus].[MSFAPN]})} ON COLUMNS,NON EMPTY {Hierarchize({[deptNa.default].[hosp].Members})} ON ROWS FROM [BSz])'
    pt.webdetails.cda.dataaccess.QueryException: Found an unhandled exception:

    Can Somebody send me instructions or a working example?

  2. #2
    Join Date
    Jul 2007
    Posts
    2,498

    Default

    Heh


    It's SOOOOOOO much simpler.


    select { ${myparam} } on 0, Measures.[x] on 1 from [cube]


    A multiselect will be rendered as a CSV of the values, so just use it directly
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  3. #3

    Default

    Dear pmalves,

    Thank you for your excellent answer!

    Bye,
    ltorok

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.