Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: CHARTS: using dynamic fields as CATEGORY and/or SERIES column?!

  1. #1

    Default CHARTS: using dynamic fields as CATEGORY and/or SERIES column?!

    Dear all,

    I'm running out of ideas so maybe some of you guys have an idea to solve this issue:

    Report sources
    - Datasource: MDX-query providing a measure/value FIELD "myval" and two dimensional FIELDs "mycol1" and "mycol2"
    - Parameter: par_cat_field which contains values "[mycol1]" and "[mycol2]"

    Report objective

    Produce a bar chart with dynamic category columns
    - VALUE column: "myval"
    - CATEGORY column: should be DYNAMICALLY set using the parameter "par_cat_field"-field


    The values coming from the "par_cat_field" seem to be not interpreted as FIELD name but rather as a STRING which forces
    the chart to sum all values up at a constant value (e.g. "[mycol1]").
    I also tried some variations on the parametervalues due to the brackets coming from MDX: "["[mycol1]"]" also does not work

    QUESTION: is it possible to have that kind of interactivity "natively" within the report designer (if yes: how ) or must some kind of report-pre-processor be used?


  2. #2
    Join Date
    Mar 2003


    Use a beanshell-script expression for the pointer of a pointer resolving:

    Object getValue()
       String realField = dataRow.get("par_cat_field");
       if (realField == null) return null;
       return dataRow.get(realField);
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3
    Join Date
    Aug 2008


    Thank you for the hint!

    I resolved this issue differently by generating a FUNCTION which reads several fields from the MDX-query fields and concatenates the values conditionally based on a parameter value.

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.