Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Report designer - XML DataSource String to Number conversion for Chart

  1. #1
    Join Date
    Oct 2014
    Posts
    7

    Lightbulb Report designer - XML DataSource String to Number conversion for Chart

    Hi everybody,
    I'm creating a report with an XML datasource witch is going to have some some charts (pie charts); I've some problems at this point: the fields of the xml are all interpreted as strings and so i can't use them as value-columns for charts.

    Is there a way to make a type conversion from String to Number in a xml datasource ? or am I missing something ?

    Thanks,
    Claudio

  2. #2
    Join Date
    Oct 2014
    Posts
    7

    Default

    Just as a reminder. I've not found a solution but as workaround I've added a function:

    Object getValue() {
    if (dataRow == null) {
    return null;
    }
    String value = (String) dataRow.get("valImpRif");
    return new Float (value);
    }
    and used it instead of my parameter.

    At this point I've another simple question: is it possible to make a parametrized function ? So that I can pass the "valImpRif" string and recycle the function for every field i

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.